eZ\Publish\Core\FieldType\RichText\Type::getName PHP Метод

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

It will be used to generate content name and url alias if current field is designated to be used in the content name/urlAlias pattern.
public getName ( eZ\Publish\SPI\FieldType\Value $value ) : string
$value eZ\Publish\SPI\FieldType\Value
Результат string
    public function getName(SPIValue $value)
    {
        $result = null;
        if ($section = $value->xml->documentElement->firstChild) {
            $textDom = $section->firstChild;
            if ($textDom && $textDom->hasChildNodes()) {
                $result = $textDom->firstChild->textContent;
            } elseif ($textDom) {
                $result = $textDom->textContent;
            }
        }
        if ($result === null) {
            $result = $value->xml->documentElement->textContent;
        }
        return trim(preg_replace(array('/\\n/', '/\\s\\s+/'), ' ', $result));
    }