public function SmartDateFormat::setOptions in Smart Date 3.1.x
Same name and namespace in other branches
- 8.2 src/Entity/SmartDateFormat.php \Drupal\smart_date\Entity\SmartDateFormat::setOptions()
- 8 src/Entity/SmartDateFormat.php \Drupal\smart_date\Entity\SmartDateFormat::setOptions()
- 3.x src/Entity/SmartDateFormat.php \Drupal\smart_date\Entity\SmartDateFormat::setOptions()
- 3.0.x src/Entity/SmartDateFormat.php \Drupal\smart_date\Entity\SmartDateFormat::setOptions()
- 3.2.x src/Entity/SmartDateFormat.php \Drupal\smart_date\Entity\SmartDateFormat::setOptions()
- 3.3.x src/Entity/SmartDateFormat.php \Drupal\smart_date\Entity\SmartDateFormat::setOptions()
- 3.4.x src/Entity/SmartDateFormat.php \Drupal\smart_date\Entity\SmartDateFormat::setOptions()
Sets the array of options for this format.
Parameters
array $options: The array of options to use for this format.
Return value
$this
Overrides SmartDateFormatInterface::setOptions
File
- src/
Entity/ SmartDateFormat.php, line 285
Class
- SmartDateFormat
- Defines the Smart date format entity.
Namespace
Drupal\smart_date\EntityCode
public function setOptions(array $values) {
$keys = $this
->getAllKeys();
foreach ($keys as $key) {
if (isset($values[$key])) {
$this
->set($key, $values[$key]);
}
}
return $values;
}