public function addAdministrationCommands()
    {
        $entity = $this->getController()->getItem();

        if ($entity->isOwnable() && $entity->owner->authorize('administration')) {
            if ($entity->isEnablable()) {
                $this->addCommand('enable');
            }

            if ($entity->isCommentable()) {
                $this->addCommand('commentstatus');
            }
        }
    }
public function addAdministrationCommands()
    {
        $entity = $this->getController()->getItem();

        if ($entity->isOwnable() && $entity->owner->authorize('administration')) {
            if ($entity->isEnablable()) {
                $this->addCommand('enable');
            }

            if ($entity->isCommentable()) {
                $this->addCommand('commentstatus');
            }
        }
    }
public function addAdministrationCommands ( ) { $ entity = $ this -> getController ( ) -> getItem ( ) ; if ( $ entity -> isOwnable ( ) && $ entity -> owner -> authorize ( 'administration' ) ) { if ( $ entity -> isEnablable ( ) ) { $ this -> addCommand ( 'enable' ) ; } if ( $ entity -> isCommentable ( ) ) { $ this -> addCommand ( 'commentstatus' ) ; } } }
Add Admin Commands for an entity.
Add Admin Commands for an entity .