Returns array of items loaded through ajax.

@return array
542183
private function getItems()
    {
        $items = [];

        $layer = $this->layerResolver->get();
        $filterList = $this->getFilterList();

        foreach ($filterList->getFilters($layer) as $filter) {
            if ($filter->getRequestVar() == $this->getFilterName()) {
                foreach ($filter->getItems() as $item) {
                    $item->setBaseUrl($this->_redirect->getRedirectUrl());
                    $items[] = $item->toArray(['url', 'count', 'is_selected', 'label']);
                }
            }
        }

        return $items;
    }
593399
protected function collectItems()
    {
        $items = [];

        foreach ($this->_layout as $row => $unused) {
            foreach ($this->_layout[$row] as $column => $item) {
                $items[] = $item;
            }
        }

        return $items;
    }
787542
private function loadFiles(): array
    {
        $items = [];
        if (!is_dir($this->path)) {
            return $items;
        }

        $entries = Finder::create()->files()->name('*.php')->in($this->path);

        // Load files.
        foreach ($entries as $entry) {
            $basename = call_user_func([$entry, 'getBasename']);

            if ($this->isEnvironmentFilename($basename)) {
                // Do not process this file. It will be handled later.
                continue;
            }

            $pathRelative = call_user_func([$entry, 'getRelativePath']);
            $configKey = rtrim($basename, '.php');

            // Load main config-file.
            $this->loadFile($items, $this->path, $pathRelative, $configKey);

            // Load environment config-file.
            $this->loadFile($items, $this->path, $pathRelative, $configKey, $this->environment);
        }

        return $items;
    }
387134
public function getItems()
    {
        $items = new ArrayList();

        // If the value has been set, use that
        if ($this->value != 'unchanged') {
            $sourceObject = $this->getSourceObject();
            if (is_array($sourceObject)) {
                $values = is_array($this->value) ? $this->value : preg_split('/ *, */', trim($this->value));

                foreach ($values as $value) {
                    $item = new stdClass;
                    $item->ID = $value;
                    $item->Title = $sourceObject[$value];
                    $items->push($item);
                }
                return $items;
            }

            // Otherwise, look data up from the linked relation
            if (is_string($this->value)) {
                $ids = explode(',', $this->value);
                foreach ($ids as $id) {
                    if (!is_numeric($id)) {
                        continue;
                    }
                    $item = DataObject::get_by_id($sourceObject, $id);
                    if ($item) {
                        $items->push($item);
                    }
                }
                return $items;
            }
        }

        if ($this->form) {
            $fieldName = $this->name;
            $record = $this->form->getRecord();
            if (is_object($record) && $record->hasMethod($fieldName)) {
                return $record->$fieldName();
            }
        }

        return $items;
    }
977633
public function ajaxes()
    {
        $ajaxes = $this->app->make('ajaxes.collection')->all();

        $headers = ['AJAX action', 'Accessibility'];

        $dataset = array_map(function ($action) {
            return [
                $action->getSlug(),
                $action->getArgument('accessibility'),
            ];
        }, $ajaxes);

        $this->table($headers, $dataset);
    }
529791
public function getStatus(): array
    {
        return [
            'url' => $this->request_url,
            'route' => $this->getCurrentRoute(),
            'ajax' => $this->ajax,
            'method' => $_SERVER['REQUEST_METHOD'],
            'format' => $this->format,
            'match' => $this->match
        ];
    }
760348
public function getListItems()
    {
        $item_arr = [];
        foreach ($this->items as $item)
        {
            $item_arr[$item->id] = $item->title;
        }
        return $item_arr;
    }
843262
public function getItems()
    {
        $manager = Yii::$app->getAuthManager();
        $avaliable = [];
        foreach (array_keys($manager->getRoles()) as $name) {
            $avaliable[$name] = 'role';
        }

        foreach (array_keys($manager->getPermissions()) as $name) {
            if ($name[0] != '/') {
                $avaliable[$name] = 'permission';
            }
        }

        $assigned = [];
        foreach ($manager->getAssignments($this->id) as $item) {
            $assigned[$item->roleName] = $avaliable[$item->roleName];
            unset($avaliable[$item->roleName]);
        }

        return [
            'avaliable' => $avaliable,
            'assigned' => $assigned
        ];
    }
1370103
public function toArray(): array
	{
		$results = [];

		foreach($this->items as $item)
		{
			$results[] = $item->toArray();
		}

		return $results;
	}
1097449
public function getItems()
    {
        if (!($this->items instanceof TypeInterface)) {
            $this->items = TypeCollection::getInstance()->getTypeByName($this->items);
        }

        return $this->items;
    }
1352047
public function getItems()
    {
        $items = [];
        if (isset($this->cart->items) === true) {
            foreach ($this->cart->items as $item) {
                $items[$item->getHash()] = $item;
            }
        }

        return $items;
    }
818987
public function fetch()
    {
        return [
            'name' => $this->getName($this->controllerName),
            'collection' => $this->getCollection(),
            'resource' => $this->getResource(),
            'model' => $this->getModel(),
            'namespace' => $this->getNamespace()
        ];
    }
995623
public function getList()
    {
        $routeMatch = $this->getEvent()->getRouteMatch();
        
        $type = $this->params('type', false);
        
        $alerts = $this->getAlertDataHandler()->getAlertsStructure($type);
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $alertssJson = $serializer->serialize($alerts, 'json');
        $response->setContent($alertssJson);
        return $response;
    }
1238138
public function getAll(): array {
		$forms = $this->forms;
		$a     = [];
		foreach ($forms as $id => $item) {
			$a[$id] = $item->get();
		}

		return $a;
	}
1122335
public function getProductsAjax()
    {
        if (!$this->access('product')) {
            return array('error' => $this->text('No access'));
        }

        $params = array(
            'status' => $this->getPosted('status'),
            'title_sku' => $this->getPosted('term'),
            'store_id' => $this->getPosted('store_id'),
            'limit' => array(0, $this->config('autocomplete_limit', 10))
        );

        $products = (array) $this->sku->getList($params);

        $product_ids = array();

        foreach ($products as $product) {
            $product_ids[] = $product['product_id'];
        }

        $options = array(
            'entity' => 'product',
            'entity_id' => $product_ids,
            'template_item' => 'backend|content/product/suggestion'
        );

        foreach ($products as &$product) {
            $this->setItemThumb($product, $this->image, $options);
            $this->setItemPriceFormatted($product, $this->price);
            $this->setItemRendered($product, array('item' => $product), $options);
        }

        return $products;
    }
1316930
public function getNavData()
    {
        $result = [];

        if ($this->menu->items)
        {
            foreach ($this->menu->items as $item)
            {
                $data = $this->getRecursiveData($item);
                if (!ArrayHelper::getValue($data, 'url') && ! ArrayHelper::getValue($data, 'items')) {

                } else {
                    $result[$item->id] = $data;
                }
            }
        }

        return $result;
    }
738042
public function getItems()
    {
        if ($this->items === null) {
            $fusionContext = $this->runtime->getCurrentContext();
            $this->currentNode = isset($fusionContext['activeNode']) ? $fusionContext['activeNode'] : $fusionContext['documentNode'];
            $this->currentLevel = 1;
            $this->items = $this->buildItems();
        }

        return $this->items;
    }