class UpdateAction extends CAction { public function run ( ) { / / Hier steht die Programmlogik der Action } }
Damit der Controller die Action kennt, überschreiben wir die actions()-Methode unserer Controller-Klasse:
class PostController extends CController { public function actions() { return array( 'edit'=>'application.contro... ); } }
www.yiiframework.comclass UpdateAction extends CAction { public function run ( ) { / / place the action logic here } }
In order for the controller to be aware of this action, we override the actions() method of our controller class:
class PostController extends CController { public function actions() { return array( 'edit'=>'application.contro... ); } }
www.yiiframework.comActions werden von einem Controller verwendet, um auf spezifische Benutzer-Requests zu antworten.
Eine Action-Klasse XyzClass aus der xyz-Erweiterung kann in unserer Controller-Klasse verwendet werden, indem wir dort die Methode CController::actions überschreiben:
class TestController extends CController { public function actions() { return array( 'xyz'=>array( 'class'=>'ext.xyz.XyzClass', 'property1'=>'value1', 'property2'=>'value2', ), // Andere Actions ); } }
www.yiiframework.comActions are used by a controller to respond specific user requests.
Given an action class XyzClass belonging to the xyz extension, we can use it by overriding the CController::actions method in our controller class:
class TestController extends CController { public function actions() { return array( 'xyz'=>array( 'class'=>'ext.xyz.XyzClass', 'property1'=>'value1', 'property2'=>'value2', ), // other actions ); } }
www.yiiframework.com3.
Legen 2 neue Ebenen ein und übernennen Sie die Ebenen von oben nach unten: actions, images, buttons.
info.template-help.com3.
Insert 2 new layers and rename the layers from top to bottom: actions, images, buttons.
info.template-help.comWould you like to add some words, phrases or translations?
Submit a new entry.