yii\rest\Action::init PHP Méthode

init() public méthode

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

Usage Example

 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