Возвращает информацию о плагине

@param  array  $item  Предыдущая версия информации (по умолчанию null)

@return  array  Массив информации, пригодный для записи в БД
325896
public function __item($item = null)
    {
        $result['name'] = $this->getName();
        $result['content'] = '0';
        $result['active'] = is_null($item) ? true : $item['active'];
        $result['settings'] = Eresus_CMS::getLegacyKernel()->db->
            escape(is_null($item) ? encodeOptions($this->settings) : $item['settings']);
        $result['title'] = $this->title;
        $result['version'] = $this->version;
        $result['description'] = $this->description;
        return $result;
    }
969098
protected function convertItem($item)
    {
        foreach ($item as $key => $value) {
            if (!isset($this->converters[$key])) {
                continue;
            }

            foreach ($this->converters[$key] as $converter) {
                $item[$key] = call_user_func($converter, $item[$key]);
            }
        }

        return $item;
    }
860340
protected function _isItemActive(array $item): bool
    {
        if (empty($item['url'])) {
            return false;
        }
        $current = $this->_currentUrl;
        if (!empty($item['url']['plugin']) && $item['url']['plugin'] != $current['plugin']) {
            return false;
        }
        if ($item['url']['controller'] == $current['controller'] && $item['url']['action'] == $current['action']) {
            $this->_controllerActive = $current['controller'];
            $this->_actionActive = $item['url']['action'];

            return true;
        }
        if (!empty($this->_actionActive) && $item['url']['controller'] == $current['controller']) {
            $this->_controllerActive = $current['controller'];

            return true;
        }

        return false;
    }
754981
protected function checkList($item)
	{
		$inList = in_array($item, $this->list);
		
		$allow = null;
		
		if ($this->mode == self::MODE_BLACKLIST) {
			$allow = ! $inList;
		} else {
			$allow = $inList;
		}
		
		return $allow;
	}
476837
public function __item($item = null)
    {
        $result = parent::__item($item);
        $result['content'] = true;
        return $result;
    }
808839
public function normalizeValue($item)
    {
        if (is_array($item)) {
            $normalized = [];

            foreach ($item as $key => $value) {
                $key = $this->recursive ? $this->normalizeKey($key) : $key;

                if (is_array($value)) {
                    $normalized[$key] = $this->normalizeValue($value);
                } elseif ($value instanceof \stdClass) {
                    $normalized[$key] = $this->normalizeValue(
                        Arr::convertFromStdClass($value)
                    );
                } else {
                    $normalized[$key] = $value;
                }
            }
        } elseif ($item instanceof \stdClass) {
            $normalized = $this->normalizeValue(
                Arr::convertFromStdClass($item)
            );
        } else {
            $normalized = $item;
        }

        return $normalized;
    }
459992
protected function doClean(Item $item)
    {
        $item->setIntro(strip_tags($item->getIntro(), $this->allowedTags['intro']));
        $item->setContent(strip_tags($item->getContent(), $this->allowedTags['content']));

        return $item;
    }
891484
protected function inflateItem ($item)
    {
        if (isset($item->sub_button) & count($item->sub_button) > 0) {
            $object = new MenuItem($item->name, MenuItem::KEYWORD);
            foreach ($item->sub_button as $subItem) {
                $object = $object->withItem($this->inflateItem($subItem));
            }
        } else {
            if (isset($item->url)) {
                $object = new MenuItem($item->name, $item->type, $item->url);
            } elseif (isset($item->key)) {
                $object = new MenuItem($item->name, $item->type, $item->key);
            } else {
                $object = new MenuItem($item->name, $item->type);
            }
        }

        return $object;
    }
328429
public function parse(array $item): array
    {
        foreach ($item['siteSettings'] as $settingKey => $settings) {
            $siteSettings = new Section_SiteSettings(array_merge($settings, [
                'siteId' => isset($settings['siteId']) ? Craft::$app->sites->getSiteByHandle($settings['siteId'])->id : Craft::$app->sites->getPrimarySite()->id,
            ]));
            if (isset($siteSettings['hasUrls']) && (bool) $siteSettings['hasUrls'] === false) {
                $siteSettings['uriFormat'] = null;
            }
            $item['siteSettings'][$settingKey] = $siteSettings;
        }
        $section = new Section($item);

        return [$section, null];
    }
1201440
public function addDictionaryMeta($item)
    {
        if (\is_string($item)) {
            $item = [
                'name'  => $item,
                'table' => $item,
                'map'   => $item,
            ];
        }

        $name  = $item['name'];
        $table = ($item['table'] ?? $name);
        $map   = ($item['map'] ?? $name);

        $this->dictionaryMeta[$name] = [
            'table' => $table,
            'map'   => $map,
        ];

        return $this;
    }
1235651
public function prepare($item)
    {
        $prepared = array();

        foreach($item as $key => $value) {
            //if it's null
            if($value === null) {
                //set it and continue
                $prepared[$key] = null;
                continue;
            }

            //if is array
            if(is_array($value)) {
                //recursive
                $prepared[$key] = $this->prepare($value);
                continue;
            }

            //if it can be converted
            if(is_scalar($value)) {
                $prepared[$key] = (string) $value;
                continue;
            }

            //we tried our best ...
            $prepared[$key] = $value;
        }

        return $prepared;
    }
274782
public function get($item)
    {
        $data = $this->getData();

        return empty($data->$item) ? null : $data->$item;
    }
794223
public function getItemUrl($item)
    {
        $item = $this->getItem($item);
        return $item ? $item->normalizedUrl : null;
    }
1138016
protected function getStableOrientationsInEmptyBox(Item $item): array
    {
        $orientationsInEmptyBox = $this->getPossibleOrientationsInEmptyBox($item);

        return array_filter(
            $orientationsInEmptyBox,
            function (OrientatedItem $orientation) {
                return $orientation->isStable();
            }
        );
    }
184916
public function getMessages($item = null)
    {
        if (is_string($item)) {
            return array_key_exists($item, $this->messages) ? $this->messages[$item] : array();
        }

        return $this->messages;
    }
512774
protected function getInvocation(array $item)
    {
        $invocation = '';

        if (isset($item['class']) && isset($item['type'])) {
            $invocation.= $item['class'].$item['type'];
        }

        $invocation.= $item['function'];
        $invocation.= '(';

        if (isset($item['args'])) {
            $args = [];

            foreach ($item['args'] as $arg) {
                $args[] = $this->varToString($arg);
            }

            $invocation.= implode(', ', $args);
        }

        $invocation.= ')';

        return $invocation;
    }
122372
private function getFormattedItem(Item $item)
    {
        $data = [
            'type'       => $this->getFormattedName($item->getTransformer()),
            'id'         => $item->getData()->id,
            'attributes' => $item->sanitize(),
        ];

        if ($links = $item->getLinks()) {
            $data['links'] = $links;
        }

        return $data;
    }