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

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

Returns true if entity is persisted.
public isPersisted ( ) : boolean
Результат boolean
    public function isPersisted();

Usage Example

Пример #1
0
Файл: Form.php Проект: ytnuk/orm
 protected function attached($control)
 {
     parent::attached($control);
     $this->addComponent($this->createComponent($this->entity), 'this');
     $this->addGroup('orm.form.action.group');
     $action = $this->addContainer('action');
     $action->addSubmit('add', 'orm.form.action.add.label')->setDisabled($this->entity->isPersisted());
     $action->addSubmit('edit', 'orm.form.action.edit.label')->setDisabled(!$this->entity->isPersisted());
     $action->addSubmit('delete', 'orm.form.action.delete.label')->setValidationScope(FALSE)->setDisabled(!$this->entity->isPersisted());
 }
All Usage Examples Of Nextras\Orm\Entity\IEntity::isPersisted