Returns an array of summary items
@return array
505682
public function summary()
    {
        $options = array('count' => true);

        return array(
            'user_total' => $this->user->getList($options),
            'order_total' => $this->order->getList($options),
            'review_total' => $this->review->getList($options),
            'product_total' => $this->product->getList($options)
        );
    }
312747
protected function _getList()
    {
        $data = array();

        if ($items = $this->_state->getList()) {
            $name = AnInflector::singularize($this->getName());

            foreach ($items as $item) {
                $this->_state->setItem($item);
                $name = null;
                $item = $this->_serializeToArray($item, $name);

                if (count($commands = $this->getToolbarCommands('list'))) {
                    $item['commands'] = $commands;
                }

                $data[] = $item;
            }

            $data = array(
                'data' => $data,
            );
            
            if (is($items, 'AnDomainEntitysetAbstract')) {
                $data['pagination'] = array(
                    'offset' => (int) $items->getOffset(),
                    'limit' => (int) $items->getLimit(),
                    'total' => (int) $items->getTotal(),
                );
            }
        }

        return $data;
    }
264501
public function getTotalItems()
    {
        if ($this->totalItems === null) {
            $this->totalItems = count($this->list);
        }

        return $this->totalItems;
    }
356430
public function toArray()
    {
        return [
            'title' => $this->title,
            'description' => $this->description,
            'commission' => $this->commission,
            'costCentre' => $this->costCentre,
            'currencyCode' => $this->currencyCode,
            'netShippingCosts' => $this->netShippingCosts,
            'internalNote' => $this->getInternalNote(),
            'responsibleContact' => $this->createDataArray($this->responsibleContact),
            'items' => $this->itemsToArray(),
        ];
    }
169185
public function getItems()
    {
        $state = $this->state;

        return $this->once('items', function () use ($state) {
            $files = $this->getFiles();

            if (!$files) {
                return [];
            }

            $limit = $state->get('list.limit', 100);
            $items = [];

            /** @var \SplFileInfo $file */
            foreach ($files as $file) {
                $item = unserialize(file_get_contents($file->getPathname()));

                $item['id'] = $file->getBasename();

                $items[$file->getMTime()] = $item;
            }

            krsort($items);

            $result = array_slice($items, 0, $limit);

            return $result;
        });
    }
470588
public function getSummary()
    {
        $ss = new \stdClass();
        $ss->chunk = $this->itemsPerPage;
        $ss->order = $this->sortByDirection;

        $ss->startAt = $this->start;
        $ss->total = $this->getTotal();

        $ss->startAt = ($ss->startAt < $ss->chunk) ? '0' : $ss->startAt;
        $itc = intval($ss->total / $ss->chunk);
        if ($ss->total == $ss->chunk) {
            $itc = 0;
        }
        $ss->pages = $itc + 1;

        if ($ss->startAt > 0) {
            $ss->current = ($ss->startAt / $ss->chunk) + 1;
        } else {
            $ss->current = '1';
        }

        $ss->previous = ($ss->startAt >= $ss->chunk) ? ($ss->current - 2) * $ss->chunk : -1;
        $ss->next = (($ss->total - $ss->startAt) >= $ss->chunk) ? $ss->current * $ss->chunk : '';
        $ss->last = (($ss->total - $ss->startAt) >= $ss->chunk) ? ($ss->pages - 1) * $ss->chunk : '';
        $ss->currentStart = ($ss->current > 1) ? ((($ss->current - 1) * $ss->chunk) + 1) : '1';
        $ss->currentEnd = ((($ss->current + $ss->chunk) - 1) <= $ss->last) ? ($ss->currentStart + $ss->chunk) - 1 : $ss->total;
        $ss->needsPaging = ($ss->total > $ss->chunk) ? true : false;

        return $ss;
    }
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;
	}
268820
public function toArray()
    {
        return [
            'current_page' => $this->currentPage(),
            'data' => $this->items->toArray(),
            'first_page_url' => $this->url(1),
            'from' => $this->firstItem(),
            'next_page_url' => $this->nextPageUrl(),
            'path' => $this->path,
            'per_page' => $this->perPage(),
            'prev_page_url' => $this->previousPageUrl(),
            'to' => $this->lastItem(),
        ];
    }
734515
protected function getItemLines()
    {
        $result = array();
        if ($this->invoiceSource->getType() === Source::Order) {
            // Note: getOrderDetailTaxes() is new in 1.6.1.0.
            $lines = method_exists($this->order, 'getOrderDetailTaxes')
                ? $this->mergeProductLines($this->order->getProductsDetail(), $this->order->getOrderDetailTaxes())
                : $this->order->getProductsDetail();
        } else {
            $lines = $this->creditSlip->getOrdersSlipProducts($this->invoiceSource->getId(), $this->order);
        }

        foreach ($lines as $line) {
            $result[] = $this->getItemLine($line);
        }
        return $result;
    }
1277624
public function getFlatSubItems()
    {
        $key = $this->getKey();
        $itemIds = Arr::get($this->_tree, $key);
        $flatItemIds = $this->_dot($itemIds, $key ? $key . '.' : '');
        $items = [];
        foreach ($flatItemIds as $itemId => $value) {
            $items[$itemId] = $this->_itemData[$itemId];
        }
        return $items;
    }
955132
public function get_archive_item_details() {
		return array(
			'year'  => array(
				'condition'    => is_year() || is_month() || is_day(),
				'title_format' => 'Y',
				'link'         => get_year_link( get_query_var( 'year' ) ),
			),
			'month' => array(
				'condition'    => is_month() || is_day(),
				'title_format' => 'F',
				'link'         => get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) ),
			),
			'day'   => array(
				'condition'    => is_day(),
				'title_format' => 'd',
				'link'         => get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) ),
			),
		);
	}
1113231
public function getSummary() {
    $summary = [];
    switch (TRUE) {
      case ($this->state === Audit::NOT_APPLICABLE):
        $summary[] = "This policy is not applicable to this site.";
        break;

      case ($this->state === Audit::ERROR):
        $tokens = [
          'exception' => isset($this->tokens['exception']) ? $this->tokens['exception'] : 'Unknown exception occured.'
        ];
        $summary[] = strtr('Could not determine the state of ' . $this->getTitle() . ' due to an error:
```
exception
```', $tokens);
        break;

      case ($this->state === Audit::WARNING):
        $summary[] = $this->getWarning();
      case ($this->state === Audit::SUCCESS):
      case ($this->state === Audit::PASS):
      case ($this->state === Audit::NOTICE):
        $summary[] = $this->getSuccess();
        break;

      case ($this->state === Audit::WARNING_FAIL):
        $summary[] = $this->getWarning();
      case ($this->state === Audit::FAILURE):
      case ($this->state === Audit::FAIL):
        $summary[] = $this->getFailure();
        break;

      default:
        throw new AuditResponseException("Unknown AuditResponse state ({$this->state}). Cannot generate summary for '" . $this->getTitle() . "'.");
        break;
    }
    return implode(PHP_EOL, $summary);
  }
974213
public function getItems() {
		$batch = $this->getBatch();
		$items = array();
		foreach ($batch as $b) {
			$items[] = $b;
		}
		return $items;
	}
1141635
public function getVary(): array
    {
        if (!$vary = $this->headers->get('Vary', null, false)) {
            return [];
        }

        $ret = [];
        foreach ($vary as $item) {
            $ret = array_merge($ret, preg_split('/[\s,]+/', $item));
        }

        return $ret;
    }
53849
public function get_performance_summary() {
        return array(array(
            'contextswithfilters' => count($this->textfilters),
            'filterscreated' => $this->filterscreated,
            'textsfiltered' => $this->textsfiltered,
            'stringsfiltered' => $this->stringsfiltered,
        ), array(
            'contextswithfilters' => 'Contexts for which filters were loaded',
            'filterscreated' => 'Filters created',
            'textsfiltered' => 'Pieces of content filtered',
            'stringsfiltered' => 'Strings filtered',
        ));
    }
1059020
public function summaryFields()
    {
        $summaryFields = parent::summaryFields();
        $summaryFields = array_merge(
            $summaryFields, array(
                'Title'       => _t('News.TITLE', 'Title'),
                'Author'      => _t('News.AUTHOR', 'Author'),
                'PublishFrom' => _t('News.PUBLISH', 'Publish from'),
                'Status'      => _t('News.STATUS', 'Status'),
            )
        );

        return $summaryFields;
    }
208516
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'human_status'        => $this->human_status(),
            'latest_update_id'    => $this->latest() ? $this->latest()->id : null,
            'latest_status'       => $this->latest_status(),
            'latest_human_status' => $this->latest_human_status(),
            'latest_icon'         => $this->latest_icon(),
            'permalink'           => $this->permalink(),
            'duration'            => $this->duration(),
            'meta'                => $this->meta(),
            'occurred_at'         => $this->occurred_at(),
            'created_at'          => $this->created_at(),
            'updated_at'          => $this->updated_at(),
        ]);
    }