Sulu\Component\Util\SuluNodeHelper::getLocalizedPropertyValues PHP Method

getLocalizedPropertyValues() public method

Return all the localized values of the localized property indicated by $name.
public getLocalizedPropertyValues ( PHPCR\NodeInterface $node, string $name )
$node PHPCR\NodeInterface
$name string Name of localized property
    public function getLocalizedPropertyValues(NodeInterface $node, $name)
    {
        $values = [];
        foreach ($node->getProperties() as $property) {
            /* @var PropertyInterface $property */
            preg_match('/^' . $this->languageNamespace . ':([a-zA-Z_]*?)-' . $name . '/', $property->getName(), $matches);
            if ($matches) {
                $values[$matches[1]] = $property->getValue();
            }
        }
        return $values;
    }