当前位置: 首页>>代码示例>>PHP>>正文


PHP ActiveController::actions方法代码示例

本文整理汇总了PHP中yii\rest\ActiveController::actions方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveController::actions方法的具体用法?PHP ActiveController::actions怎么用?PHP ActiveController::actions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\rest\ActiveController的用法示例。


在下文中一共展示了ActiveController::actions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actions

 public function actions()
 {
     $actions = parent::actions();
     // disable the "delete" and "create" actions
     unset($actions['delete'], $actions['create']);
     return $actions;
 }
开发者ID:exelents,项目名称:test-fornekki,代码行数:7,代码来源:CategoriesController.php

示例2: actions

 /**
  * Override the base actions in order to support some enhancements of actions
  * by default for all active controllers.
  * @see \yii\rest\ActiveController::actions()
  */
 public function actions()
 {
     $actions = parent::actions();
     $actions['index']['class'] = '\\luya\\rest\\actions\\IndexAction';
     $actions['delete']['class'] = '\\luya\\rest\\actions\\DeleteAction';
     return $actions;
 }
开发者ID:luyadev,项目名称:luya-core,代码行数:12,代码来源:ActiveController.php

示例3: actions

 public function actions()
 {
     $actions = parent::actions();
     unset($actions['view']);
     $actions1 = ArrayHelper::merge(['actionPedido'], $actions);
     return $actions1;
 }
开发者ID:apmauj,项目名称:1f8bf10ab74d6f5ca69f7c07b7ee1c38,代码行数:7,代码来源:PedidoController.php

示例4: actions

 public function actions()
 {
     $actions = parent::actions();
     // customize the data provider preparation with the "prepareDataProvider()" method
     $actions['index']['prepareDataProvider'] = [$this, 'prepareDataProvider'];
     return $actions;
 }
开发者ID:judy123,项目名称:yii2_advanced,代码行数:7,代码来源:ClassifyRestController.php

示例5: actions

 /**
  * @inheritdoc
  */
 public function actions()
 {
     $actions = parent::actions();
     unset($actions['index']);
     unset($actions['create']);
     return $actions;
 }
开发者ID:pylypen,项目名称:api-side,代码行数:10,代码来源:StudioController.php

示例6: actions

 public function actions()
 {
     $actions = parent::actions();
     unset($actions['index'], $actions['update'], $actions['create'], $actions['delete'], $actions['view']);
     //unset($actions['update'], $actions['create'], $actions['delete'], $actions['view']);
     return $actions;
 }
开发者ID:C12D,项目名称:advancedapi,代码行数:7,代码来源:PilotpController+ver3.php

示例7: actions

 public function actions()
 {
     $actions = parent::actions();
     // remove parent's control over create
     unset($actions['create']);
     return $actions;
 }
开发者ID:nveeed,项目名称:Sandbox,代码行数:7,代码来源:RestController.php

示例8: actions

 /**
  * 定义actions
  * @return array
  */
 public function actions()
 {
     $actions = parent::actions();
     //unset($actions['create']) ;
     //设置index操作的dataProvider
     $actions['index']['prepareDataProvider'] = [$this, 'prepareDataProvider'];
     return $actions;
 }
开发者ID:xiaohongyang,项目名称:yii_shop,代码行数:12,代码来源:UserController.php

示例9: actions

 /**
  * Переобределяем свои действия
  * @return array
  */
 public function actions()
 {
     $actions = parent::actions();
     unset($actions['index']);
     //unset($actions['update']);
     $this->model = new $this->modelClass();
     return $actions;
 }
开发者ID:vait,项目名称:allinst,代码行数:12,代码来源:CouriersController.php

示例10: actions

 public function actions()
 {
     $actions = parent::actions();
     // change index class
     $actions['index']['class'] = '\\admin\\rest\\IndexAction';
     $actions['delete']['class'] = '\\admin\\rest\\DeleteAction';
     return $actions;
 }
开发者ID:efueger,项目名称:luya,代码行数:8,代码来源:RestActiveController.php

示例11: actions

 public function actions()
 {
     $actions = parent::actions();
     // customize the data provider preparation with the "prepareDataProvider()" method
     $actions['index']['prepareDataProvider'] = [$this, 'actionIndex'];
     $actions['view']['findModel'] = [$this, 'actionView'];
     $actions['delete']['findModel'] = [$this, 'actionDelete'];
     return $actions;
 }
开发者ID:exelents,项目名称:test-fornekki,代码行数:9,代码来源:ItemsController.php

示例12: actions

 public function actions(){
     $actions = parent::actions();
     unset($actions['index']);
     unset($actions['update']);
     unset($actions['create']);
     unset($actions['delete']);
      // $actions['index']['prepareDataProvider'] = [$this, 'prepareDataProvider'];
     return $actions;
 }
开发者ID:xerxes333,项目名称:Dictionary,代码行数:9,代码来源:ShiftsController.php

示例13: actions

 public function actions()
 {
     $actions = parent::actions();
     // disable the "delete" and "create" actions
     unset($actions['delete'], $actions['create'], $actions['get'], $actions['post']);
     // customize the data provider preparation with the "prepareDataProvider()" method
     $actions['index']['prepareDataProvider'] = array($this, 'prepareDataProvider');
     return $actions;
 }
开发者ID:vikrantd,项目名称:easytest,代码行数:9,代码来源:ProductController.php

示例14: actions

 public function actions()
 {
     return array_merge(parent::actions(), ['index' => ['class' => 'yii\\rest\\IndexAction', 'modelClass' => $this->modelClass, 'checkAccess' => [$this, 'checkAccess'], 'prepareDataProvider' => function ($action) {
         $m = new InputParamsSearch();
         $params = \Yii::$app->getRequest()->getQueryParams();
         $dataProvider = $m->search($params);
         return $dataProvider;
     }], 'create' => ['class' => 'api\\components\\rest\\InputParamsCreateAction', 'modelClass' => $this->modelClass, 'checkAccess' => [$this, 'checkAccess']]]);
 }
开发者ID:zxvad,项目名称:PriceCalculationOfCircuitBoards,代码行数:9,代码来源:InputparamsController.php

示例15: actions

 public function actions()
 {
     $actions = parent::actions();
     // Only allow read-only actions (for now)
     unset($actions['delete'], $actions['update'], $actions['create']);
     //customize the data provider preparation with the "prepareDataProvider()" method
     $actions['index']['prepareDataProvider'] = [$this, 'prepareDataProvider'];
     return $actions;
 }
开发者ID:Humanized,项目名称:viajero,代码行数:9,代码来源:RestController.php


注:本文中的yii\rest\ActiveController::actions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。