Nextras\Orm\Entity\IEntity::setValue PHP Метод

setValue() публичный Метод

Sets property value.
public setValue ( string $name, mixed $value ) : self
$name string
$value mixed
Результат self
    public function setValue($name, $value);

Usage Example

Пример #1
0
 public function setValues($values, $erase = FALSE) : self
 {
     $this->initEntityRelations();
     foreach ($values as $property => $value) {
         if ($this[$property] instanceof Nette\Forms\IControl) {
             $value = $value === '' ? NULL : $value;
             if ($this[$property] instanceof Nette\Forms\Controls\Checkbox && !$value && $this->metadata->getProperty($property)->isNullable) {
                 $value = NULL;
             }
             $this->entity->setValue($property, $value);
         }
     }
     return parent::setValues($values, $erase);
 }
All Usage Examples Of Nextras\Orm\Entity\IEntity::setValue