Отрисовывает атрибуты элемента

@access  private

@param  array  $item  Элемент

@return  string  Отрисованные атрибуты
482836
function attrs($item)
    {
        $result = '';
        if ($item['id']) $result .= ' id="'.$item['id'].'"';
        if ($item['disabled']) $result .= ' disabled="disabled"';
        if (count($item['class'])) $result .= ' class="'.implode(' ', $item['class']).'"';
        # Ширина
        if (isset($item['width'])) $item['style'][] = 'width: '.$item['width'];
        # Стили
        if (count($item['style'])) $result .= ' style="'.implode(';', $item['style']).'"';
        $result .= ' '.$item['extra'];
        return $result;
    }
1078635
protected function getFeeLine($item)
    {
        $feeEx = $item['line_total'];
        $feeVat = $item['line_tax'];

        $result = array(
                Tag::Product => $this->t($item['name']),
                Tag::UnitPrice => $feeEx,
                Meta::PrecisionUnitPrice => 0.01,
                Tag::Quantity => 1,
            ) + $this->getVatRangeTags($feeVat, $feeEx);

        return $result;
    }
723979
public function getEditUrlFor($item)
    {
        $params = array('id' => $item['id']);
        $params = array_merge($params, $this->getExtraParameters());

        return array(
            'path' => $this->getPathByConvention($this::SUFFIX_EDIT),
            'params' => $params,
        );
    }
36642
public function update($item)
    {
        $item['updated'] = gettime('Y-m-d H:i:s');
        $item['options'] = encodeOptions($item['options']);
        $item['title'] = Eresus_CMS::getLegacyKernel()->db->escape($item['title']);
        $item['caption'] = Eresus_CMS::getLegacyKernel()->db->escape($item['caption']);
        $item['description'] = Eresus_CMS::getLegacyKernel()->db->escape($item['description']);
        $item['hint'] = Eresus_CMS::getLegacyKernel()->db->escape($item['hint']);
        $item['keywords'] = Eresus_CMS::getLegacyKernel()->db->escape($item['keywords']);
        $item['content'] = Eresus_CMS::getLegacyKernel()->db->escape($item['content']);
        $item['options'] = Eresus_CMS::getLegacyKernel()->db->escape($item['options']);
        $result = Eresus_CMS::getLegacyKernel()->db->updateItem($this->table, $item, "`id`={$item['id']}");
        return $result;
    }
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;
    }
1281990
public static function EscapeHtmlUri( $item )
	{
		if ( $item instanceof Undefined )
		    return "";

	    $value = $item . "";
	    $result = "";

	    for ( $i = 0; $i < strlen( $value ); $i++ )
	    {
			$num = ord( $value[ $i ] );

		    if ( $num >= 0x20 && $num < 0x7f )
			   $result .= chr( $num );
		    else
		    {
			   $num2 = $num / 0x10;
			   $num3 = $num % 0x10;
			   $ch =   $num2 >= 10 ? chr( 0x41 + ( $num2 - 10 ) ) : chr( 0x30 + $num2 );
			   $ch2 =  $num3 >= 10 ? chr( 0x41 + ( $num3 - 10 ) ) : chr( 0x30 + $num3 );
			   $result .= '%';
			   $result .= $ch;
			   $result .= $ch2;
		    }
		}
		return $result;
	}
260882
public function getContainerValues(&$item)
    {
        if (false === is_object($item) && false === is_array($item)) {
            $item = $this->getContainerServices($this->getContainerParameters($item));
        }

        return $item;
    }
221946
public function getAction($item)
    {
        $options = [
            'query' => [
                'item'      => $this->getItemId($item),
                'processor' => $this->getId(),
            ],
        ];
        if ($this->isLinkDialog()) {
            $options['attributes']['class'][] = 'use-ajax';
            $options['attributes']['class'][] = 'minidialog';
            $options['query']['minidialog'] = 1;
            $options['query'] += drupal_get_destination();
        }

        return new Action(
            $this->getLinkTitle(),
            'admin/calista/action-process',
            $options,
            $this->getLinkIcon(),
            $this->getLinkPriority(),
            $this->isLinkPrimary(),
            true,
            false,
            $this->getLinkGroup()
        );
    }
1013376
public function get( $item )
    {
        return isset( $this->config[$item] ) ? $this->config[$item] : null;
    }
398249
protected function getType( $item )
    {
        $type = gettype( $item );
        if ( is_object( $item ) )
            $type .= "[" . get_class( $item ) . "]";

        return $type;
    }
84618
public function escape($item)
	{
    if ( \is_string($item) && ($item = trim($item)) ){
      $items = explode(".", str_replace("`", "", $item));
      $r = [];
      foreach ( $items as $m ){
        if ( !bbn\str::check_name($m) ){
          return false;
        }
        array_push($r, "`".$m."`");
      }
      return implode('.', $r);
    }
		return false;
	}
1023072
protected function renderItem($item) {
        $linkTemplate = empty($item['items']) ? $this->linkTemplate : $this->itemSubmenuLinkTemplate;
        $labelTemplate = empty($item['items']) ? $this->labelTemplate : $this->itemSubmenuLabelTemplate;

        if (isset($item['url'])) {
            $template = ArrayHelper::getValue($item, 'template', $linkTemplate);

            $params = [
                '{url}' => Html::encode(Url::to($item['url'])),
                '{label}' => $item['label'],
                '{icon}' => isset($item['icon']) ? "<i class='{$item['icon']}'></i>" : '',
            ];

            return strtr($template, $params);
        } else {
            $template = ArrayHelper::getValue($item, 'template', $labelTemplate);

            return strtr($template, [
                '{label}' => $item['label'],
                '{icon}' => isset($item['icon']) ? "<i class='{$item['icon']}'></i>" : '',
            ]);
        }
    }
427484
protected function renderItemIcon($item)
    {
        $iconClass = ArrayHelper::getValue($item, 'icon');
        if ($iconClass !== null) {
            $class = [$this->iconClass];
            Html::addCssClass($class, $iconClass);
            return Html::tag('i', '', ['class' => $class]);
        } else {
            return '';
        }
    }
957921
public function getValue(ArrayAccess $item): string
    {
        $value = $item->offsetExists($this->name)
            ? $item->offsetGet($this->name)
            : '';

        if (is_callable($this->filter)) {
            if ($this->filter instanceof ContextAwareFilterInterface) {
                $this->filter->setContext(clone $item);
            }

            $value = call_user_func($this->filter, $value);
        }

        return $value;
    }
246544
public function getAdminObjectUrl($item)
    {
        /** @var AbstractAdmin $admin */
        $admin = $this->getContainer()->get('sonata.admin.pool')->getAdminByClass($item->getSourceClass());

        if ($admin->getObject($item->getSourceItemId())) {
            return $admin->generateObjectUrl('edit', $admin->getObject($item->getSourceItemId()));
        }

        return null;
    }
1074228
public function getItem($item)
	{
		return isset($this->items[$item]) ? $this->items[$item] : false;
	}
856333
protected function createFormField($item)
    {
        $required = ($item['required'] === true) ? ", 'required' => 'required'" : "";

        return $this->wrapField(
            $item,
            "{!! Form::" . $this->typeLookup[$item['type']] . "('" . $item['name'] . "', null, ['class' => 'form-control'$required]) !!}"
        );
    }