set() public method

Sets a private setting for an entity.
public set ( integer $entity_guid, string $name, string $value ) : boolean
$entity_guid integer The entity GUID
$name string The name of the setting
$value string The value of the setting
return boolean
Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function set($entity_guid, $name, $value)
 {
     $entity = get_entity((int) $entity_guid);
     if (!$entity) {
         return false;
     }
     if (!isset($value)) {
         return false;
     }
     $this->iterator++;
     $id = $this->iterator;
     $row = (object) ['id' => $id, 'entity_guid' => $entity->guid, 'name' => (string) $name, 'value' => (string) $value];
     $this->rows[$id] = $row;
     $this->addQuerySpecs($row);
     return parent::set($entity_guid, $name, $value);
 }