TitleProvider/StructureTitleProvider.php
public function getTitle($typeId)
    {
        $request = $this->requestStack->getMasterRequest();
        $structure = $request->attributes->get('structure');

        if (!$structure instanceof StructureInterface || $structure->getUuid() !== $typeId) {
            return;
        }

        $property = $structure->getProperty('title');

        if (!$property) {
            return;
        }

        return $property->getValue();
    }
public function getTitle($typeId)
    {
        $request = $this->requestStack->getMasterRequest();
        $structure = $request->attributes->get('structure');

        if (!$structure instanceof StructureInterface || $structure->getUuid() !== $typeId) {
            return;
        }

        $property = $structure->getProperty('title');

        if (!$property) {
            return;
        }

        return $property->getValue();
    }
{@inheritdoc}