public function parent()
    {
        if (!$this->has('slug')) {
            throw new FatalErrorException(__d('content', "Missing property 'slug', make sure to include it using Query::select()."));
        }

        return TableRegistry::get('Content.Contents')
            ->find()
            ->select(['id', 'slug', 'content_type_slug', 'language'])
            ->where([
                'id' => $this->translation_for,
                'status' => 1,
            ])
            ->first();
    }
public function parent()
    {
        if (!$this->has('slug')) {
            throw new FatalErrorException(__d('content', "Missing property 'slug', make sure to include it using Query::select()."));
        }

        return TableRegistry::get('Content.Contents')
            ->find()
            ->select(['id', 'slug', 'content_type_slug', 'language'])
            ->where([
                'id' => $this->translation_for,
                'status' => 1,
            ])
            ->first();
    }
public function parent ( ) { if ( ! $ this -> has ( 'slug' ) ) { throw new FatalErrorException ( __d ( 'content' , "Missing property 'slug', make sure to include it using Query::select()." ) ) ; } return TableRegistry :: get ( 'Content.Contents' ) -> find ( ) -> select ( [ 'id' , 'slug' , 'content_type_slug' , 'language' ] ) -> where ( [ 'id' => $ this -> translation_for , 'status' => 1 , ] ) -> first ( ) ; }
Gets the parent content for which this content is a translation of.

@return mixed The parent content if exists, null otherwise
Gets the parent content for which this content is a translation of .