Returns an array of help items
@param string
@return array
167242
public function getList($langcode = '')
    {
        if (empty($langcode)) {
            $langcode = 'en';
        }

        $result = &gplcart_static("help.list.$langcode");

        if (isset($result)) {
            return $result;
        }

        $this->hook->attach('help.list.before', $langcode, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $dir = $this->getDirectory($langcode);

        if (!is_dir($dir)) {
            return $result = array();
        }

        $result = $titles = $weights = array();

        foreach (gplcart_file_scan($dir, array('md')) as $file) {
            $data = $this->get($file);
            if (!empty($data['title'])) {
                $result[] = $data;
                $titles[] = $data['title'];
                $weights[] = $data['weight'];
            }
        }

        array_multisort($weights, SORT_ASC, $titles, SORT_ASC, $result);
        $this->hook->attach('help.list.after', $langcode, $result, $this);
        return $result;
    }
1234284
function get_suggestions($word)
    {
        $matches = $word ? $this->check($word) : $this->matches;

        if ($matches[0][4]) {
            $suggestions = explode("\t", $matches[0][4]);
            if (count($suggestions) > self::MAX_SUGGESTIONS) {
                $suggestions = array_slice($suggestions, 0, self::MAX_SUGGESTIONS);
            }

            return $suggestions;
        }

        return array();
    }
790612
private function helpers()
    {
        $HELPERS_FILE = [];
        // From base
        if (file_exists($pathHelpers = VENDOR_KNOB_BASE_DIR . '/src/config/' . static::HELPERS_FILE . '.php')) {
            $HELPERS_FILE += include $pathHelpers;
        }
        // From App
        if (file_exists($pathHelpers = APP_DIR . '/config/' . static::HELPERS_FILE . '.php')) {
            $HELPERS_FILE += include $pathHelpers;
        }

        return array_merge([
            'case' => [
                'lower' => function ($value) {
                    return strtolower((string)$value);
                },
                'upper' => function ($value) {
                    return strtoupper((string)$value);
                },
            ],
            'count' => function ($value = []) {
                return count($value);
            },
            'moreThan1' => function ($value = []) {
                return count($value) > 1;
            },
            'date' => [
                'xmlschema' => function ($value) {
                    return date('c', strtotime($value));
                },
                'string' => function ($value) {
                    return date('l, d F Y', strtotime($value));
                },
                'format' => function ($value) {
                    return date(get_option('date_format'), strtotime($value));
                },
            ],
            'toArray' => function ($value) {
                return explode(',', $value);
            },
            'ucfirst' => function ($value) {
                return ucfirst($value);
            },
        ], $HELPERS_FILE);
    }
123688
public function findAll($value): ?array
    {
        $founded = array_keys($this->items->toArray(), $value, true);

        if (0 === count($founded)) {
            return null;
        }

        return $founded;
    }
786555
public function getItems()
	{
		/**
		 * @var array $res
		 */
		$res = array();
		foreach ( $this->iter as /** @var XPathItem $item */ $item )
		{
			if ( count( $res ) == 10)
				break;

			$res[] = $item->CloneInstance();
		}

		return $res;
	}
332453
private function getHeader($value)
    {
        if (!$value) {
            return [];
        }
        $newHeader = [];
        foreach ($value as $key => $item) {
            if (is_string($key)) {
                $newHeader[] = $key . ': ' . $item;
            } else {
                $newHeader[] = $item;
            }
        }
        return $newHeader;
    }
1352669
public function getItemsAsArray()
    {
        $items = [];

        foreach ($this->teasers as $page => $teaser) {
            if ($page == $this->intPage) {
                $items[] = [
                    'page' => $page,
                    'href' => null,
                    'title' => null,
                    'text' => $teaser,
                ];
            } else {
                $items[] = [
                    'page' => $page,
                    'href' => $this->linkToPage($page),
                    'title' => StringUtil::specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['goToPage'], $page)),
                    'text' => $teaser,
                ];
            }
        }

        if ($this->singlePageUrl) {
            $items[] = [
                'page' => 'singlePage',
                'href' => $this->singlePageUrl,
                'title' => null,
                'text' => $GLOBALS['TL_LANG']['MSC']['readOnSinglePage'],
            ];
        }

        return $items;
    }
66007
public function items() {
        if ( $this->_max <= 1 ) {
            return [];
        }
        $end = min( $this->_max, $this->_current + floor( $this->count / 2 ) );
        $start = max( 1, $end - $this->count + 1 );
        $items = [];
        if ( $start != 1 ) {
            $items[] = $this->item( $this->label_to_start, 1);
        }
        for ( $i = $start; $i <= $end; $i ++ ) {
            $items[] = $this->item( $i, $i, ($i == $this->_current) );
        }
        if ( $this->_current != $this->_max ) {
            $items[] = $this->item( $this->label_next, ($this->_current + 1) );
        }
        return $items;
    }
1161750
protected function getNormalizedHelpers()
    {
        if (isset($this->controller->helpers)) {
            return Hash::normalize((array)$this->controller->helpers);
        }

        return array();
    }
296396
public function getHelper(string $name)
    {
        if (isset($this->helpers[$name])) {
            return $this->helpers[$name];
        }

        return null;
    }
596847
public static function stringToArray(?string $string): array {
        $result = [];
        $strLen = \strlen($string);
        if (null === $string) return $result;
        if (1 === $strLen) {
            $result[] = $string;
            return $result;
        }
        for ($i = 0; $i < $strLen; $i++) {
            $result[] = $string[$i];
        }
        return $result;
    }
760348
public function getListItems()
    {
        $item_arr = [];
        foreach ($this->items as $item)
        {
            $item_arr[$item->id] = $item->title;
        }
        return $item_arr;
    }
503512
public function helpers($helpers = null)
    {
        deprecationWarning(
            'Email::helpers() is deprecated. Use $email->viewBuilder()->getHelpers()/setHelpers() instead.'
        );

        if ($helpers === null) {
            return $this->getHelpers();
        }

        return $this->setHelpers((array)$helpers);
    }
1085491
public function getAvailableItems()
    {
        return ArrayHelper::map($this->manager->getItems(), 'name', function ($item) {
            return empty($item->description)
                ? $item->name
                : $item->name . ' (' . $item->description . ')';
        });
    }
1347549
protected function _parseHelpersInContent($content) {
		preg_match_all('/\$this-\>([A-Z][A-Za-z]+)-\>/', $content, $matches);
		if (empty($matches[1])) {
			return [];
		}

		$helpers = array_unique($matches[1]);

		return $helpers;
	}
256871
public function items()
    {
        return [
            'home'  => [
                'title' => trans('dashboard::menus.principal.home'),
                'url'   => '#home',
                'data-scroll' => true
            ],
            'about'  => [
                'title' => trans('dashboard::menus.principal.about'),
                'url'   => '#about',
                'data-scroll' => true
            ],
            'team'  => [
                'title' => trans('dashboard::menus.principal.team'),
                'url'   => '#team',
                'data-scroll' => true
            ],
            'services'  => [
                'title' => trans('dashboard::menus.principal.services'),
                'url'   => '#services',
                'data-scroll' => true
            ],
            'platform'  => [
                'title' => trans('dashboard::menus.principal.platform'),
                'url'   => route('auth.loginGet'),
                'data-scroll' => true
            ],
            'contact'  => [
                'title' => trans('dashboard::menus.principal.contact'),
                'url'   => '#contact',
                'data-scroll' => true
            ],
            'facebook'  => [
                'url'   => '#',
                'icon'  => 'fa fa-facebook',
            ],
            'twitter'  => [
                'url'   => '#',
                'icon'  => 'fa fa-twitter',
            ],
            'google'  => [
                'url'   => '#',
                'icon'  => 'fa fa-google',
            ],
        ];
    }
579891
public function getHelperSet(): HelperSet
	{
		if (!$this->helperSet)
		{
			$this->helperSet = $this->getDefaultHelperSet();
		}

		return $this->helperSet;
	}