Return the text to be dislayed next to the "Edit" button indicating the currently selected item.
By default is displays $labelField and wraps it in a link if the object has the Link() method.
@param  DataObjext $item
@return string
976354
function getCurrentItemText($item = null)
    {
        $text = $this->getDefaultText();

        if (is_null($item)) {
            $item = $this->getItem();
        }

        if ($item && $item->ID > 0) {
            $labelField = $this->labelField;
            if (isset($item->$labelField)) {
                $text = $item->$labelField;
            } else {
                user_error("PageSearchField can't find field called ".$labelField."on ".$item->ClassName, E_USER_ERROR);
            }

            if (method_exists($item, "Link")) {
                $text = "<a href='{$item->Link()}' target='_blank'>".$text.'</a>';
            }
        }

        return $text;
    }
140893
protected function htmlEntityEncode($item)
    {
        if (is_array($item)) {
            array_walk_recursive($item, function (&$value) {
                $value = htmlentities($value);
            });
        } else {
            $item = htmlentities($item);
        }

        return $item;
    }
368267
private function renderElement(Element $element) : string
    {
        $label = $element->getLabel();

        if ($label->isEmpty()) {
            return $element->render();
        }

        return $label->render() . $element->render();
    }
1036445
public function getDeleteUrlFor($item)
    {
        $params = array('id' => $item->getId(), 'popup' => $this->getPopupId());
        $params = array_merge($params, $this->getExtraParameters());

        return array(
            'path' => 'kunstmaanleadgenerationbundle_admin_rule_abstractrule_delete',
            'params' => $params,
        );
    }
425253
protected function _objectToRDF($item) {
    $object = new stdClass();

    if(self::_isValue($item)) {
      $object->type = 'literal';
      $value = $item->{'@value'};
      $datatype = property_exists($item, '@type') ? $item->{'@type'} : null;

      // convert to XSD datatypes as appropriate
      if(is_bool($value)) {
        $object->value = ($value ? 'true' : 'false');
        $object->datatype = $datatype ? $datatype : self::XSD_BOOLEAN;
      } else if(is_double($value) || $datatype == self::XSD_DOUBLE) {
        // canonical double representation
        $object->value = preg_replace(
          '/(\d)0*E\+?/', '$1E', sprintf('%1.15E', $value));
        $object->datatype = $datatype ? $datatype : self::XSD_DOUBLE;
      } else if(is_integer($value)) {
        $object->value = strval($value);
        $object->datatype = $datatype ? $datatype : self::XSD_INTEGER;
      } else if(property_exists($item, '@language')) {
        $object->value = $value;
        $object->datatype = $datatype ? $datatype : self::RDF_LANGSTRING;
        $object->language = $item->{'@language'};
      } else {
        $object->value = $value;
        $object->datatype = $datatype ? $datatype : self::XSD_STRING;
      }
    } else {
      // convert string/node object to RDF
      $id = is_object($item) ? $item->{'@id'} : $item;
      $object->type = (strpos($id, '_:') === 0) ? 'blank node' : 'IRI';
      $object->value = $id;
    }

    // skip relative IRIs
    if($object->type === 'IRI' && !self::_isAbsoluteIri($object->value)) {
      return null;
    }

    return $object;
  }
909362
protected function getQuoteType($item)
    {
        $bounds = $this->getConfigItemBounds($item);

        if (!$bounds[0] or !$bounds[1]) {
            return $this->defaultQuoteType;
        }

        $file = $this->getFileContents();
        $substr = substr($file, $bounds[0], $bounds[1] - $bounds[0] + 1);
        return substr_count($substr, '"') > substr_count($substr, "'") ? '"' : "'";
    }
824306
protected function quoteItem(
        $item,
        array $settings,
        /*# bool */ $rawMode = false
    )/*# : string */ {
        // is an object
        if (is_object($item)) {
            return $this->quoteObject($item, $settings);
        }

        // is a string, quote with prefix and suffix
        return $rawMode ? $item : $this->quote($item, $settings);
    }
1163608
public function renderItem($item)
    {
        $options = ArrayHelper::getValue($item, 'options', array());
        if (isset($item['featured'])) {
            Html::addCssClass($this->htmlOptions, Enum::ClEARING_FEATURE);
            Html::addCssClass($options, Enum::CLEARING_FEATURE_IMG);
        }
        $imgOptions                 = array();
        $imgOptions['src']          = ArrayHelper::getValue($item, 'th', '#');
        $imgOptions['data-caption'] = ArrayHelper::getValue($item, 'caption', null);
        $imgOptions['class']        = 'th';
        $url                        = ArrayHelper::getValue($item, 'img', '#');

        return \CHtml::tag('li', $options, \CHtml::link(\CHtml::tag('img', $imgOptions), $url));

    }
385975
public static function buttonDropdown($label, $items, $htmlOptions = array())
    {
        $htmlOptions['items'] = $items;
        $type = TbArray::popValue('type', $htmlOptions, self::BUTTON_TYPE_LINKBUTTON);
        return self::btn($type, $label, $htmlOptions);
    }
105569
public function getRow($item)
	{
		$row = [];

		foreach ($this->columns as $column) {
			$row[] = strip_tags($column->render($item));
		}

		return $row;
	}
1167744
public function _getElementHtml(
        \Magento\Framework\Data\Form\Element\AbstractElement $element
    ) {
        $originalData = $element->getOriginalData();
        $buttonLabel = !empty($originalData['button_label'])
            ? $originalData['button_label'] : $this->buttonLabel;
        $url = $this->_urlBuilder->getUrl(
            'dotdigitalgroup_email/datafield/save',
            ['website_id' => $this->getRequest()->getParam('website', 0)]
        );
        $this->addData(
            [
                'button_label' => $buttonLabel,
                'html_id' => $element->getHtmlId(),
                'ajax_url' => $url,
            ]
        );

        return $this->_toHtml();
    }
1080895
protected function formatName(Item $item)
    {
        return empty($item->description) ? $item->name : $item->name . ' (' . $item->description . ')';
    }
766248
public function renderItem($item)
    {
        if (is_string($item)) {
            return $item;
        }
        if (!isset($item['label'])) {
            throw new InvalidConfigException("The 'label' option is required.");
        }
        $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels;
        $label = $encodeLabel ? Html::encode($item['label']) : $item['label'];
        $options = ArrayHelper::getValue($item, 'options', ['class'=>'btn btn-sm']);
        $url = ArrayHelper::getValue($item, 'url', '#');

        if (isset($item['active'])) {
            $active = ArrayHelper::remove($item, 'active', false);
        } else {
            $active = $this->isItemActive($item);
        }

        if ($active) {
            Html::addCssClass($options, 'btn-info');
        } else {
            Html::addCssClass($options, 'btn-default');
        }

        return Html::a($label, $url, $options);
    }
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;
    }
1358097
protected function renderMenuItem($item)
	{
		if(isset($item['url']))
		{
			$label=$this->linkLabelWrapper===null ? $item['label'] : CHtml::tag($this->linkLabelWrapper, $this->linkLabelWrapperHtmlOptions, $item['label']);
			return CHtml::link($label,$item['url'],isset($item['linkOptions']) ? $item['linkOptions'] : array());
		}
		else
			return CHtml::tag('span',isset($item['linkOptions']) ? $item['linkOptions'] : array(), $item['label']);
	}
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;
    }
25303
function(item) {
        var a = $('<a/>', {
            href: 'javascript:;',
            role: 'option',
            'aria-selected': 'false'
        });

        a.append( this.render(this.options.titleTemplate).html(this.highlight(item.title)) );

        if (item.description) {
            a.append( this.render(this.options.descTemplate).html(item.description) );
        }

        return a;
    }