yii\rest\Action::init PHP Method

init() public method

public init ( )
    public function init()
    {
        if ($this->modelClass === null) {
            throw new InvalidConfigException(get_class($this) . '::$modelClass must be set.');
        }
    }

Usage Example

Beispiel #1
0
 public function init()
 {
     $this->modelClass = UserProfile::className();
     $this->findModel = UserController::className() . '::' . UserController::METHOD_FIND_MODEL;
     $this->checkAccess = UserController::className() . '::' . UserController::METHOD_CHECK_ACCESS;
     parent::init();
 }
All Usage Examples Of yii\rest\Action::init