public function PushIntent::setProperty in CMS Content Sync 2.0.x
Same name and namespace in other branches
- 8 src/PushIntent.php \Drupal\cms_content_sync\PushIntent::setProperty()
- 2.1.x src/PushIntent.php \Drupal\cms_content_sync\PushIntent::setProperty()
Set the value of the given field. By default every field handler will have a field available for storage when pulling / pushing that accepts all non-associative array-values. Within this array you can use the following types: array, associative array, string, integer, float, boolean, NULL. These values will be JSON encoded when pushing and JSON decoded when pulling. They will be saved in a structured database by Sync Core in between, so you can't pass any non-array value by default.
Parameters
string $name: The name of the field in question
mixed $value: The value to store
File
- src/
PushIntent.php, line 1009
Class
- PushIntent
- Class PushIntent.
Namespace
Drupal\cms_content_syncCode
public function setProperty($name, $value) {
// Don't need to store empty values.
if (null === $value || '' === $value || is_array($value) && 0 === count($value)) {
return;
}
$this->operation
->setProperty($name, $value, $this->activeLanguage);
}