public function save(array $properties, $key = null, array $options = array())
 {
     if (!$key && empty($properties['uuid'])) {
         $properties['uuid'] = $this->generate_uuid();
     }
     return parent::save($properties, $key, $options);
 }
Ejemplo n.º 2
0
 /**
  * Before deleting the record, we make sure that it is not used as a parent page or as a
  * location target.
  */
 public function delete($key)
 {
     $site_id = $this->select('siteid')->filter_by_nid($key)->rc;
     if ($site_id) {
         unset(self::$blueprint_cache[$site_id]);
     }
     return parent::delete($key);
 }