isNew() public method

Function require by symfony >= 1.2 admin generators.
public isNew ( ) : boolean
return boolean
Example #1
0
 public function isNew()
 {
     if (parent::isNew()) {
         return true;
     }
     if (!$this->_table instanceof dmDoctrineTable) {
         return false;
     }
     foreach ($this->_table->getPrimaryKeys() as $pk) {
         if (!$this->get($pk)) {
             return true;
         }
     }
     return false;
 }