protected function _getInstance($name)
    {
        $this->loadModel('Field.FieldInstances');
        $instance = $this->FieldInstances
            ->find()
            ->contain(['EavAttribute'])
            ->where(['EavAttribute.name' => $name])
            ->first();

        if (!$instance) {
            $this->_error(__d('field', 'Invalid field instance.'), 504);
        }

        return $instance;
    }
protected function _getInstance($name)
    {
        $this->loadModel('Field.FieldInstances');
        $instance = $this->FieldInstances
            ->find()
            ->contain(['EavAttribute'])
            ->where(['EavAttribute.name' => $name])
            ->first();

        if (!$instance) {
            $this->_error(__d('field', 'Invalid field instance.'), 504);
        }

        return $instance;
    }
protected function _getInstance ( $ name ) { $ this -> loadModel ( 'Field.FieldInstances' ) ; $ instance = $ this -> FieldInstances -> find ( ) -> contain ( [ 'EavAttribute' ] ) -> where ( [ 'EavAttribute.name' => $ name ] ) -> first ( ) ; if ( ! $ instance ) { $ this -> _error ( __d ( 'field' , 'Invalid field instance.' ) , 504 ) ; } return $ instance ; }
Get field instance information.

@param string $name EAV attribute name
@return \Field\Model\Entity\FieldInstance
@throws \Cake\Network\Exception\NotFoundException When invalid attribute name
is given
Get field instance information .