buildPathName example

public static function createFromContext(Context $context): self
    {
        $self = new self($context);
        $self->set(LanguageDefinition::ENTITY_NAME, 'id', $context->getLanguageId());

        return $self;
    }

    public function set(string $entity, string $propertyName, string $value): void
    {
        $this->paths[$this->buildPathName($entity$propertyName)] = $value;
    }

    public function get(string $entity, string $propertyName): string
    {
        $path = $this->buildPathName($entity$propertyName);

        if (!$this->has($entity$propertyName)) {
            throw new \InvalidArgumentException(sprintf('Unable to load %s: %s', $pathprint_r($this->paths, true)));
        }

        return $this->paths[$path];
    }
Home | Imprint | This part of the site doesn't use cookies.