Creates and return a new action under given name

@param string $name

@return ActionInterface
971914
public function createAction($name)
    {
        if (!$this->actions->containsKey($name)) {
            throw new \InvalidArgumentException(sprintf(
                'Any action registered under "%s" name, only ["%s"] are.',
                $name,
                implode('","', $this->actions->getKeys())
            ));
        }

        return clone $this->actions->get($name);
    }
663711
public static function create($name = null)
    {
        $name = $name ? $name : self::generateName();
        $container = new Container($name);
        $container->register('Container', $container);
        self::$containers[$name] = $container;
        return $container;
    }
906213
public function create($name){
        $this->menuCollection[$name] = new MenuCollection;
        $this->menuCollection[$name]->setName($name);

        return $this->menuCollection[$name];
    }
456591
public function create($name)
    {
        $class = $this->class;
        /** @var Group $group */
        $group = new $class($name, $this->dispatcher);
        $this->groups[$group->getName()] = $group;

        return $group;
    }
245602
protected function createRole($name)
    {
        $role = RoleProxy::create(['name' => $name])->fresh();

        $role->givePermissionTo(ResourcePermissions::allPermissionsFor('user'));
        $role->givePermissionTo(ResourcePermissions::allPermissionsFor('role'));

        return $role;
    }
506040
protected function createHandler(string $name): TaskHandler
    {
        $handler = Reflection::newInstance(ltrim($name, '\\'));

        if ($handler instanceof TaskHandler) {
            return $handler;
        }

        throw new RuntimeException('Task ' . $name . ' handler must implements `TaskHandler` interface');
    }
1014420
public function create($name, HttpResourceInterface $resource)
    {
        $this->client->create(
            $this->capabilities->get($name)->getUrl(),
            $resource
        );

        return $this;
    }
1310694
protected function actionByName($name)
    {
        // Find the action handler
        $actions = $this->batchActions();
        if (!isset($actions[$name]['class'])) {
            throw new InvalidArgumentException("Invalid batch action: {$name}");
        }
        return $this->buildAction($actions[$name]['class']);
    }
208234
public static function createFromName($name)
    {
        $value = array_search($name, static::$names, true);

        if (!$value) {
            throw new InvalidArgumentException(sprintf(
                'Level with name "%s" is not in list: %s',
                $name,
                implode(', ', static::$names)
            ));
        }

        return new static($value);
    }
74020
protected function createConnection($name)
    {
        $config = $this->getConfig($name);

        $connection = new Client($config);

        $connection->connect();

        return $connection;
    }
736988
public function newFriendRequestAction($name)
    {
        $logFile = $this->container->getParameter('claroline.param.claroline_log');
        $host = $this->request->query->get('host');
        //uncomment this for debugging puroposes...

        if ($this->container->get('kernel')->getEnvironment() === 'dev') {
            $fileLogger = new \Monolog\Logger('claroline.debug.log');
            $fileLogger->pushHandler(new \Monolog\Handler\StreamHandler($logFile));
            $fileLogger->addInfo(var_export($this->oauthManager->isAutoCreated($host), true));
        }

        $this->oauthManager->addPendingFriendRequest(
            $name,
            $host,
            $this->oauthManager->isAutoCreated($host)
        );

        return new JsonResponse(array('name' => $name, 'host' => $host));
    }
181124
public function getAction($name, $need = TRUE)
    {
        return $this->hasActions()
            ? $this->getComponent(Action::ID)->getComponent($name, $need)
            : NULL;
    }
1271984
public function get(string $name): Method
    {
        if (!$this->has($name)) {
            //Automatically creating constant
            $method = new Method($name);
            $this->add($method);

            return $method;
        }

        return parent::get($name);
    }
408322
protected function createMenuDriver(string $name): Handlers\Menu
    {
        $config = $this->app->make('config')->get("orchestra/widget::menu.{$name}", []);

        return new Handlers\Menu($name, $config);
    }
1289243
public static function create($name)
    {
        $logger = new Logger($name);

        $localLogConfig = config('logger.local_log');
        if($localLogConfig['enabled'] && !in_array($name, $localLogConfig['exclude_names'])) {
            $streamHandler = self::streamHandler($name);
            $logger->pushHandler($streamHandler);
        }

        $logstashConfig = config('logger.logstash');
        if($logstashConfig['enabled'] && !in_array($name, $logstashConfig['exclude_names'])){
            $gelfHandler = self::logStashHandler($logstashConfig);
            $logger->pushHandler($gelfHandler);
        }

        $requestId = Request::header('x-request-id');
        $logger->setRequestId($requestId);

        return $logger;
    }
42317
public function make( $name ) {
		$this->name = ucfirst( camel_case( $name ) );
		$this->createController();
		$this->createContract();
		$this->createRequests();
	}
723431
public function massAction ($name)
    {          
        $dataGrid = $this->getDataGrid($name);
        
        $action = $this->getRequest()->get('action');
        
        if (!$action){
            throw new \InvalidArgumentException('Parameter "action" in not valid'); 
        }
        
        $handler = $this->container->get('neutron_data_grid.handler.datagrid');
        $handler
            ->setDataGrid($dataGrid)
            ->resolveOptions($this->getRequestParameters())
            ->buildQuery()
        ;
        
        $ids = $this->getRequest()->get('ids', array());
        $selectAll = ($this->getRequest()->get('selectAll') === 'true');

        $event = new MassActionEvent($name, $action, $ids, $selectAll, $handler->getQuery());
        $this->container->get('event_dispatcher')->dispatch(DataGridEvents::onMassAction, $event);
        
        return new JsonResponse($event->getExtraData());
    }