controllers/AuthItemController.php
protected function getValidChildTypes()
    {
        $validTypes = array();

        switch ($this->type) {
            case CAuthItem::TYPE_OPERATION:
                break;

            case CAuthItem::TYPE_TASK:
                $validTypes[] = CAuthItem::TYPE_OPERATION;
                break;

            case CAuthItem::TYPE_ROLE:
                $validTypes[] = CAuthItem::TYPE_OPERATION;
                $validTypes[] = CAuthItem::TYPE_TASK;
                break;
        }

        if (!$this->module->strictMode) {
            $validTypes[] = $this->type;
        }

        return $validTypes;
    }
protected function getValidChildTypes()
    {
        $validTypes = array();

        switch ($this->type) {
            case CAuthItem::TYPE_OPERATION:
                break;

            case CAuthItem::TYPE_TASK:
                $validTypes[] = CAuthItem::TYPE_OPERATION;
                break;

            case CAuthItem::TYPE_ROLE:
                $validTypes[] = CAuthItem::TYPE_OPERATION;
                $validTypes[] = CAuthItem::TYPE_TASK;
                break;
        }

        if (!$this->module->strictMode) {
            $validTypes[] = $this->type;
        }

        return $validTypes;
    }
protected function getValidChildTypes ( ) { $ validTypes = array ( ) ; switch ( $ this -> type ) { case CAuthItem :: TYPE_OPERATION : break ; case CAuthItem :: TYPE_TASK : $ validTypes [ ] = CAuthItem :: TYPE_OPERATION ; break ; case CAuthItem :: TYPE_ROLE : $ validTypes [ ] = CAuthItem :: TYPE_OPERATION ; $ validTypes [ ] = CAuthItem :: TYPE_TASK ; break ; } if ( ! $ this -> module -> strictMode ) { $ validTypes [ ] = $ this -> type ; } return $ validTypes ; }
Returns a list of the valid child types for the given type.
@return array the valid types.
Returns a list of the valid child types for the given type .