當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。