Returns an array representation of the page

@return array  associative array containing all page properties
195503
public function toArray()
        {
            return array_merge(
                parent::toArray(),
                array(
                     'action'       => $this->getAction(),
                     'controller'   => $this->getController(),
                     'module'       => $this->getModule(),
                     'params'       => $this->getParams(),
                     'route'        => $this->getRoute(),
                     'reset_params' => $this->getResetParams(),
                     'encodeUrl'    => $this->getEncodeUrl(),
                     'scheme'       => $this->getScheme(),
                )
            );
        }
483410
public function toArray()
    {
        $userParameters = [];

        foreach ($this->tsProperty as $property => $tsPropObj) {
            $userParameters[$property] = $tsPropObj->getValue();
        }

        return $userParameters;
    }
548489
public function toArray()
	{
		return array(
			'catalog.id' => $this->_node->getId(),
			'catalog.code' => $this->_node->getCode(),
			'catalog.label' => $this->_node->getLabel(),
			'catalog.status' => $this->_node->getStatus(),
			'catalog.config' => $this->getConfig(),
			'catalog.siteid' => $this->_node->__get('siteid'),
			'catalog.ctime' => $this->_node->__get('ctime'),
			'catalog.mtime' => $this->_node->__get('mtime'),
			'catalog.editor' => $this->_node->__get('editor'),
			'catalog.hasChildren' => $this->hasChildren()
		);
	}
8177
public function getPages()
    {
        $pages = array();

        if ($this->pages <= 1) {
            return array();
        }

        if ($this->pages <= $this->limit_pages) {
            for ($i = 1; $i <= $this->pages; $i++) {
                $pages[] = $this->createPage($i, $i == $this->current);
            }

            return $pages;
        }

        $num_adjacents = (int) floor(($this->limit_pages - 3) / 2);

        if ($this->current + $num_adjacents > $this->pages) {
            $sliding_start = $this->pages - $this->limit_pages + 2;
        } else {
            $sliding_start = $this->current - $num_adjacents;
        }

        if ($sliding_start < 2) {
            $sliding_start = 2;
        }

        $sliding_end = $sliding_start + $this->limit_pages - 3;

        if ($sliding_end >= $this->pages) {
            $sliding_end = $this->pages - 1;
        }

        $pages[] = $this->createPage(1, $this->current == 1);

        if ($sliding_start > 2) {
            $pages[] = $this->createPageEllipsis();
        }

        for ($i = $sliding_start; $i <= $sliding_end; $i++) {
            $pages[] = $this->createPage($i, $i == $this->current);
        }

        if ($sliding_end < $this->pages - 1) {
            $pages[] = $this->createPageEllipsis();
        }

        $pages[] = $this->createPage($this->pages, $this->current == $this->pages);

        return $pages;
    }
53439
public function toArray(): array
    {
        $array = [];
        if (isset($_SESSION[$this->name])) {
            $array = to_array($_SESSION[$this->name], true);
        }

        return $array;
    }
281560
public function toArray()
    {
        $data = [
            'name' => $this->name,
            'type' => $this->type,
            'description' => $this->description
        ];

        if (null !== $this->child) {
            $data['properties'] = [];

            foreach ($this->child as $child) {
                $data['properties'][$child->getName()] = $child->toArray();
            }
        }

        return $data;
    }
614740
public function toArray()
	{
		$properties = parent::toArray();

		$properties[$this->_prefix . 'refid'] = $this->getRefId();
		$properties[$this->_prefix . 'position'] = $this->getPosition();

		return $properties;
	}
1209882
public function toArray()
	{
		$result = parent::toArray();

		if (isset($result['activated']))
		{
			$result['activated'] = $this->getActivatedAttribute($result['activated']);
		}
		if (isset($result['permissions']))
		{
			$result['permissions'] = $this->getPermissionsAttribute($result['permissions']);
		}
		if (isset($result['suspended_at']))
		{
			$result['suspended_at'] = $result['suspended_at']->format('Y-m-d H:i:s');
		}

		return $result;
	}
1078957
public function toArray()
    {
        return [
            'text' => $this->getText($this->getModel()),
            'attributes' => $this->getConditionAttributes($this->model)->htmlAttributesToString(),
            'url' => $this->getUrl($this->getModel()),
            'position' => $this->getPosition(),
            'icon' => $this->getIcon(),
            'hideText' => $this->hideText,
        ];
    }
77660
protected function getPageLinksArray()
    {
        $links = [];
        $types = $this->getPageLinkTypes();

        $links[] = ['name' => Lang::get('backend::lang.pagelist.select_page'), 'url' => false];

        $iterator = function ($links, $level = 0) use (&$iterator) {
            $result = [];
            foreach ($links as $linkUrl => $link) {

                /*
                 * Remove scheme and host from URL
                 */
                $baseUrl = Request::getSchemeAndHttpHost();
                if (strpos($linkUrl, $baseUrl) === 0) {
                    $linkUrl = substr($linkUrl, strlen($baseUrl));
                }

                $linkName = str_repeat('&nbsp;', $level * 4);
                $linkName .= is_array($link) ? array_get($link, 'title', '') : $link;
                $result[] = ['name' => $linkName, 'url' => $linkUrl];

                if (is_array($link)) {
                    $result = array_merge(
                        $result,
                        $iterator(array_get($link, 'links', []), $level + 1)
                    );
                }
            }

            return $result;
        };

        foreach ($types as $typeCode => $typeName) {
            $links = array_merge($links, $iterator($this->getPageLinks($typeCode)));
        }

        return $links;
    }
516166
public function toArray()
    {
        $data = [];

        foreach ($this->ref->getProperties() as $property) {
            $name        = $property->getName();
            $data[$name] = $this->sanitizeToArrayValue($this->get($name));
        }

        return $data;
    }
79477
public function toArray()
    {
        $res = [];
        foreach ([
            'id',
            'displayTitle',
            'street',
            'number',
            'code',
            'town',
            'country',
            'longitude',
            'latitude',
        ] as $propertyName) {
            $res[$propertyName] = $this->{'get' . ucfirst($propertyName)}();
        }

        $res['name'] = TextUtils::truncate($this->getDisplayTitle(), 75);

        return $res;
    }
533996
public function toArray()
    {
        return array(
            'firstPage' => $this->getFirstPage(),
            'lastPage' => $this->getLastPage(),
            'offset' => $this->countOffset(),
            'summary' => $this->getSummary(),
            'hasPages' => $this->hasPages(),
            'hasAdapter' => $this->hasAdapter(),
            'hasNextPage' => $this->hasNextPage(),
            'hasPreviousPage' => $this->hasPreviousPage(),
            'nextPage' => $this->getNextPage(),
            'previousPage' => $this->getPreviousPage(),
            'nextPageUrl' => $this->getNextPageUrl(),
            'previousPageUrl' => $this->getPreviousPageUrl(),
            'currentPage' => $this->getCurrentPage(),
            'perPageCount' => $this->getItemsPerPage(),
            'total' => $this->getTotalAmount(),
            'pageNumbers' => $this->getPageNumbers()
        );
    }
996449
public function toArray() {
		if ($this->_array) {
			return $this->_array;
		}
		$root = $this->documentElement;
		if ($root == 'error') {
			return array(
				0 => array(
					'id' => $root->getAttribute('id'),
					'code' => $root->getAttribute('code'),
					'auxCode' => $root->getAttribute('auxCode'),
					'message' => $root->firstChild->nodeValue
				)
			);
		}
		$this->_array = $this->_toArray($root->childNodes);
		return $this->_array;

	}
1037848
public function getContentAsArray()
    {
        //$nav_item_page = (new \yii\db\Query())->select('*')->from('cms_nav_item_page t1')->leftJoin('cms_layout', 'cms_layout.id=t1.layout_id')->where(['t1.id' => $this->id])->one();
        $nav_item_page = $this;
        
        if (!$nav_item_page->layout) {
            return [];
        }
        
        $return = [
            'nav_item_page' => ['id' => $nav_item_page->id, 'layout_id' => $nav_item_page->layout_id, 'layout_name' => $nav_item_page->layout->name],
            '__placeholders' => [],
        ];
        
        $config = json_decode($nav_item_page->layout->json_config, true);
        
        if (isset($config['placeholders'])) {
            foreach ($config['placeholders'] as $rowKey => $row) {
                foreach ($row as $placeholderKey => $placeholder) {
                    $placeholder['nav_item_page_id'] = $this->id;
                    $placeholder['prev_id'] = 0;
                    $placeholder['__nav_item_page_block_items'] = [];
                    if (!isset($placeholder['cols'])) {
                        $placeholder['cols'] = '12';
                    }
                    
                    $return['__placeholders'][$rowKey][$placeholderKey] = $placeholder;
                    
                    $placeholderVar = $placeholder['var'];
                    
                    $return['__placeholders'][$rowKey][$placeholderKey]['__nav_item_page_block_items'] = self::getPlaceholder($placeholderVar, 0, $this);
                }
            }
        }
        
        return $return;
    }
1132034
public function __toArray()
    {
        $result = [];
        if ($this->status !== null) {
            $result['status'] = $this->status;
        }
        if ($this->code !== null) {
            $result['code'] = $this->code;
        }
        if ($this->title !== null) {
            $result['title'] = $this->title;
        }
        return $result;
    }
1022642
public function toArray()
    {
        return [
            'id' => $this->getId(),
            'nav_id' => $this->getNavId(),
            'lang' => $this->getLang(),
            'link' => $this->getLink(),
            'title' => Yii::$app->menu->encodeValue($this->title),
            'title_tag' => Yii::$app->menu->encodeValue($this->title),
            'alias' => $this->getAlias(),
            'description' => Yii::$app->menu->encodeValue($this->description),
            'keywords' => null,
            'create_user_id' => $this->createUserId,
            'update_user_id' => $this->updateUserId,
            'timestamp_create' => $this->getTimestampCreate(),
            'timestamp_update' => $this->getTimestampUpdate(),
            'is_home' => $this->getIsHome(),
            'parent_nav_id' => $this->getParentNavId(),
            'sort_index' => $this->sortIndex,
            'is_hidden' => (bool) $this->isHidden,
            'type' => $this->getType(),
            'redirect' => $this->getRedirect(),
            'container' => $this->getContainer(),
            'depth' => $this->getDept(),
        ];
    }