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


PHP Action::getName方法代码示例

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


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

示例1: add

 protected function add(Action $action)
 {
     if (isset($this->actions[$action->getName()])) {
         throw new \InvalidArgumentException(sprintf('The action "%s" already exists.', $action->getName()));
     }
     $this->actions[$action->getName()] = $action;
 }
开发者ID:hostingnuggets,项目名称:WhiteOctoberAdminBundle,代码行数:7,代码来源:ActionCollection.php

示例2: getValidationProfile

 /**
  * Will try and find a validation profile for the action provided
  * 
  * @param Action $action
  * @return ValidationProfile
  * @throws ValidationException
  */
 public function getValidationProfile(Action $action)
 {
     if (!isset($this->profiles[$action->getName()])) {
         throw new ValidationException("Could not find a validation profile for action: [{$action->getName()}]");
     }
     return $this->profiles[$action->getName()];
 }
开发者ID:projectstorm,项目名称:php-actions,代码行数:14,代码来源:ValidationProfileBank.php

示例3: addAction

 /**
  * @param Action $action
  */
 public function addAction(Action $action)
 {
     if ($this->hasAction($name = $action->getName())) {
         throw new \InvalidArgumentException(sprintf('Action "%s" already exists.', $name));
     }
     $this->actions[$name] = $action;
 }
开发者ID:loic425,项目名称:Sylius,代码行数:10,代码来源:ActionGroup.php

示例4: get

 /**
  * Get the actions for a given section & role
  * @param $section name
  */
 function get($options = null)
 {
     $results = array();
     $defaultOptions = array('context' => 'default', 'action' => '*', 'controller' => '*', 'shortName' => false);
     // Use tab to refine context on index only, as in users:index:archived
     if ($options['action'] == 'index' && !isset($options['tab'])) {
         $defaultOptions['tab'] = '*';
     }
     // Override defaults options with given (if any)
     $options = array_merge($defaultOptions, $options);
     // get the action list
     $map = $this->__get($options);
     //format the action with url, class, options
     foreach ($map as $k => $item) {
         list($controller, $action) = explode(':', $item);
         if ($controller == '*') {
             $controller = $options['controller'];
         }
         $results[$k]['name'] = Action::getName($action, $controller, $options['shortName']);
         $results[$k]['url'] = DS . $controller . DS . $action;
         $results[$k]['options']['class'] = $controller . ' ' . $action;
         $results[$k]['options']['disabled'] = !User::isAuthorized($controller, $action);
     }
     return $results;
 }
开发者ID:stripthis,项目名称:BlackRabbit,代码行数:29,代码来源:action.php

示例5: addAction

 /**
  * Add action
  *
  * @param Action $action
  *
  * @return ActionCollection
  */
 public function addAction(Action $action)
 {
     $this->actions[$action->getName()] = $action;
     return $this;
 }
开发者ID:Gtvar,项目名称:FivePercent-Api,代码行数:12,代码来源:ActionCollection.php

示例6: isTriggeredByAction

 /**
  * @param Action $action
  * @return bool
  */
 public function isTriggeredByAction($action)
 {
     return isset($action) && is_array($this->triggeredByActions) && array_key_exists($action->getName(), $this->triggeredByActions);
 }
开发者ID:wizbii,项目名称:pipeline,代码行数:8,代码来源:Store.php

示例7: Resolution

// The mysql.sql script preloads some generic values for these tables
$zend_db->delete('resolutions');
$zend_db->delete('actions');
$result = $mongo->resolutions->find();
foreach ($result as $r) {
    $o = new Resolution();
    $o->handleUpdate($r);
    $o->save();
    echo "Resolution: {$o->getName()}\n";
}
$result = $mongo->actions->find();
foreach ($result as $r) {
    $o = new Action();
    $o->handleUpdate($r);
    $o->save();
    echo "Action: {$o->getName()}\n";
}
$result = $mongo->lookups->findOne(array('name' => 'contactMethods'));
$methods = $result['items'];
foreach ($methods as $m) {
    $o = new ContactMethod();
    $o->setName($m);
    $o->save();
    echo "ContactMethod: {$o->getName()}\n";
}
$result = $mongo->lookups->findOne(array('name' => 'types'));
$types = $result['items'];
foreach ($types as $t) {
    $o = new IssueType();
    $o->setName($t);
    $o->save();
开发者ID:CodeForEindhoven,项目名称:uReport,代码行数:31,代码来源:1_lookups.php

示例8: addAction

 /**
  * @param Action $action
  */
 public function addAction($action)
 {
     $this->actions[$action->getName()] = $action;
 }
开发者ID:wizbii,项目名称:pipeline,代码行数:7,代码来源:Pipeline.php

示例9: array

<?php

/**
 * @copyright 2011 City of Bloomington, Indiana
 * @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt
 * @author Cliff Ingham <inghamn@bloomington.in.gov>
 */
include '../../../configuration.inc';
$resolutions = array('Resolved' => 'This ticket has been taken care of', 'Duplicate' => 'This ticket is a duplicate of another ticket', 'Bogus' => 'This ticket is not actually a problem or has already been taken care of');
foreach ($resolutions as $name => $description) {
    $resolution = new Resolution();
    $resolution->setName($name);
    $resolution->setDescription($description);
    $resolution->save();
    echo "{$resolution}\n";
}
$actions = array(array('name' => 'open', 'description' => 'Opened by {actionPerson}', 'type' => 'system'), array('name' => 'assignment', 'description' => '{enteredByPerson} assigned this case to {actionPerson}', 'type' => 'system'), array('name' => 'close', 'description' => 'Closed by {actionPerson}', 'type' => 'system'), array('name' => 'referral', 'description' => '{enteredByPerson} referred this case to {actionPerson}', 'type' => 'system'), array('name' => 'Inspection', 'description' => '{actionPerson} inspected this Location', 'type' => 'department'), array('name' => 'Follow up', 'description' => '{actionPerson} followed up on this ticket', 'type' => 'department'));
foreach ($actions as $a) {
    $action = new Action();
    $action->setName($a['name']);
    $action->setDescription($a['description']);
    $action->setType($a['type']);
    $action->save();
    echo "{$action->getName()}\n";
}
开发者ID:CodeForEindhoven,项目名称:uReport,代码行数:25,代码来源:0_lookups.php

示例10: testGetNameReturnString

 public function testGetNameReturnString()
 {
     $action = new Action("path", "name", "icon", []);
     $this->assertEquals("name", $action->getName());
 }
开发者ID:vardius,项目名称:list-bundle,代码行数:5,代码来源:ActionTest.php


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