Build statuses.

@param string $name
@return array $statuses
191467
public function defaultStatuses($name)
    {
        return [
            'label' => $name,
            'public' => false,
            'internal' => false,
            'exclude_from_search' => false,
            'show_in_admin_all_list' => true,
            'show_in_admin_status_list' => false,
            'label_count' => Translate::n($name.' <span class="count">(%s)</span>', $name.' <span class="count">(%s)</span>'),
        ];
    }
142841
public function targetFilters($name)
    {
        $ext = $this->getExt($name);
        $filters = [];
        if (isset($this->_data[$ext][self::FILTERS])) {
            $filters = $this->_data[$ext][self::FILTERS];
        }
        if (!empty($this->_targets[$name][self::FILTERS])) {
            $buildFilters = $this->_targets[$name][self::FILTERS];
            $filters = array_merge($filters, $buildFilters);
        }
        return array_unique($filters);
    }
1364276
public static function build($name)
    {
        if (isset(static::$_builtTypes[$name])) {
            return static::$_builtTypes[$name];
        }
        if (!isset(static::$_types[$name])) {
            throw new InvalidArgumentException(sprintf('Unknown type "%s"', $name));
        }
        if (is_string(static::$_types[$name])) {
            return static::$_builtTypes[$name] = new static::$_types[$name]($name);
        }

        return static::$_builtTypes[$name] = static::$_types[$name];
    }
1305273
public function build($name)
    {
        if (!isset($this->state_machine_definitions[$name])) {
            throw new RuntimeError('State machine not configured: ' . $name);
        }

        // name is necessary as option here, as there may be multiple state machines in the definition xml file
        $builder = new XmlStateMachineBuilder(
            [
                'name' => $name,
                'state_machine_definition' => $this->state_machine_definitions
            ],
            $this->service_locator
        );

        return $builder->build();
    }
950523
protected function buildPossiblePages($name)
	{
		$possible_classes = array();
		$class_name = $this->buildClassNameFromName($name);

		foreach ( $this->namespacePrefixes as $prefix ) {
			$possible_classes[] = $prefix . $class_name;
		}

		return $possible_classes;
	}
382131
protected function buildCommand(string $name): array
	{
		$command = strtoupper(str_replace('_', ' ', Str::camel2underscored($name)));

		if(strpos($command, ' ') === false)
		{
			return [$command];
		}

		$command = explode(' ', $command, 2);

		if(strpos($command[1], ' ') !== false)
		{
			$command[1] = str_replace(' ', '-', $command[1]);
		}

		return $command;
	}
511975
protected function findOrCreateState($name)
    {
        $name = $this->stateNamePrefix . $name;
        if ($this->targetCollection->hasState($name)) {
            $targetState = $this->targetCollection->getState($name);
        } else {
            $targetState = $this->createState($name);
            $this->addState($targetState);
        }

        return $targetState;
    }
840291
public function build()
    {
        $this->checkIfOneTopicExist();

        if ($this->hasOnlyOneTopic()) {
            foreach ($this->conditions[0] as $topic) {
                return '/topics/'.$topic;
            }
        }

        return [
            'condition' => $this->topicsForFcm($this->conditions),
        ];
    }
489391
public function stats($name = null) {
		if ($name) {
			return isset($this->_stats[$name]) ? $this->_stats[$name] : null;
		}
		return $this->_stats;
	}
377204
public static function build($name)
    {
        $class = '\\Ebanx\\Command\\';

        $className = str_replace('do', '', $name);

        if ($className == $name)
        {
            $className = str_replace('get', '', $name);
        }

        $class .= $className;

        // Request command is different depending on the checkout method (Ebanx or direct)
        if ($className == 'Request')
        {
            // Use EBANX direct
            if (\Ebanx\Config::getDirectMode() == true)
            {
                $class .= '\\Direct';
            }
            // Use EBANX checkout
            else
            {
                $class .= '\\Checkout';
            }
        }

        if (class_exists($class))
        {
            return new $class();
        }
        else
        {
            throw new \RuntimeException("Command '$className' doesn't exist.");
        }
    }
989729
protected function buildPortStatusRows(array $status)
    {
        $rows = [];

        foreach ($status['ports'] as $port => $value) {
            $row = [
                $port,
                $value['status'],
            ];

            $rows[] = $row;
        }
        $warnings = $status['state']['warning'];

        $rows[] = new TableSeparator();
        $rows[] = [new TableCell(
            sprintf('There is %d warning(s) on %s!', $warnings, $status['host']),
            ['colspan' => 2]
        )];

        return $rows;
    }
188230
public function parse($name)
    {
        $segments = array_reverse(explode('_', $name));

        if ($segments[0] == 'table') {
            array_shift($segments);
        }

        return [
            'action' => $this->getAction($segments),
            'table' => $this->getTableName($segments)
        ];
    }
580602
public function getArguments($name) {
        if (!$this->docoptResult)
            return [];

        if ($this->isArgument($name)) {
            $value = $this->docoptResult[$name];
            if (is_array($value))
                return $value;
            return [$value];
        }
        return [];
    }
969009
public function findAllByName($name)
    {
        $datasourceNodes = array();
        foreach ($this->findAll() as $datasourceNode) {
            if ($datasourceNode->getName() === $name) {
                $datasourceNodes[$datasourceNode->getPrimaryKey()] = $datasourceNode;
            }
        }

        return $datasourceNodes;
    }
129430
public final function getHeader($name): array
   {
       $key = $this->parseHeaderName($name);
       return array_key_exists($key, $this->header) ? $this->header[$key] : [];
   }
411023
public function createSlaveClients($name)
    {
        $slaves = $this->slaves($name);
        $workingSlaves = [];
        foreach ($slaves as $slave) {
            if (!isset($slave[9])) {
                throw new RedisException('Can\' retrieve slave status');
            }
            if (\strpos($slave[9], 's_down') === false && \strpos($slave[9], 'disconnected') === false) {
                $workingSlaves[] = Factory::client([
                    'host' => $slave[3],
                    'port' => $slave[5],
                    'timeout' => $this->timeout,
                    'persistent' => $this->persistent,
                    'database' => $this->database,
                    'password' => $this->getPassword(),
                ]);
            }
        }

        return $workingSlaves;
    }
332560
public function findRequirements($name)
    {
        $requirements = [];

        $module = $this->findOrFail($name);

        foreach ($module->getRequires() as $requirementName) {
            $requirements[] = $this->findByAlias($requirementName);
        }

        return $requirements;
    }