Neos\ContentRepository\Domain\Model\ExpressionBasedNodeLabelGenerator::getLabel PHP Метод

getLabel() публичный Метод

Render a node label
public getLabel ( Neos\ContentRepository\Domain\Model\NodeInterface $node, boolean $crop = true ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface
$crop boolean This argument is deprecated as of Neos 1.2 and will be removed. Don't rely on this behavior and crop labels in the view.
Результат string
    public function getLabel(NodeInterface $node, $crop = true)
    {
        $label = Utility::evaluateEelExpression($this->getExpression(), $this->eelEvaluator, array('node' => $node), $this->defaultContextConfiguration);
        if ($crop === false) {
            return $label;
        }
        $croppedLabel = Functions::substr($label, 0, 30);
        return $croppedLabel . (strlen($croppedLabel) < strlen($label) ? ' …' : '');
    }