function CurrentPathDataDefinition::getPropertyDefinitions

Overrides ComplexDataDefinitionBase::getPropertyDefinitions

File

src/TypedData/Type/CurrentPathDataDefinition.php, line 16

Class

CurrentPathDataDefinition
A typed data definition class for describing current_path data type.

Namespace

Drupal\rules\TypedData\Type

Code

public function getPropertyDefinitions() {
    if (!isset($this->propertyDefinitions)) {
        $this->propertyDefinitions['path'] = DataDefinition::create('string')->setLabel('Path')
            ->setDescription('The current path.')
            ->setRequired(TRUE);
        $this->propertyDefinitions['url'] = DataDefinition::create('uri')->setLabel('URL')
            ->setDescription('The current URL.')
            ->setRequired(TRUE);
    }
    return $this->propertyDefinitions;
}