public function getItem($create = false)
    {
        $item = $this->_mixer->getState()->getItem();

        if ($item == null && $this->_mixer->getState()->isUnique()) {
            $item = $this->fetchEntity(new AnCommandContext());
        }

        //create an new entity
        if ($item == null && $create) {
            $this->_mixer->getState()->setItem($this->getRepository()->getEntity());
        }

        return $this->_mixer->getState()->getItem();
    }
public function getItem($create = false)
    {
        $item = $this->_mixer->getState()->getItem();

        if ($item == null && $this->_mixer->getState()->isUnique()) {
            $item = $this->fetchEntity(new AnCommandContext());
        }

        //create an new entity
        if ($item == null && $create) {
            $this->_mixer->getState()->setItem($this->getRepository()->getEntity());
        }

        return $this->_mixer->getState()->getItem();
    }
public function getItem ( $ create = false ) { $ item = $ this -> _mixer -> getState ( ) -> getItem ( ) ; if ( $ item == null && $ this -> _mixer -> getState ( ) -> isUnique ( ) ) { $ item = $ this -> fetchEntity ( new AnCommandContext ( ) ) ; } //create an new entity if ( $ item == null && $ create ) { $ this -> _mixer -> getState ( ) -> setItem ( $ this -> getRepository ( ) -> getEntity ( ) ) ; } return $ this -> _mixer -> getState ( ) -> getItem ( ) ; }
Return the controller identifiable item.

@param bool $create Return an entity if there's none

@return mixed
Return the controller identifiable item .