public MapDataDefinition::setPropertyDefinition($name, DataDefinitionInterface $definition = NULL)
Sets the definition of a map property.
Parameters
string $name: The name of the property to define.
\Drupal\Core\TypedData\DataDefinitionInterface|null $definition: (optional) The property definition to set, or NULL to unset it.
Return value
$this
File
- core/lib/Drupal/Core/TypedData/MapDataDefinition.php, line 57
Class
- MapDataDefinition
- A typed data definition class for defining maps.
Namespace
Drupal\Core\TypedData
Code
public function setPropertyDefinition($name, DataDefinitionInterface $definition = NULL) { if (isset($definition)) { $this->propertyDefinitions[$name] = $definition; } else { unset($this->propertyDefinitions[$name]); } return $this; }
Please login to continue.