Beispiel #1
0
 /**
  * put your comment there...
  * 
  */
 public function __construct($dbDriver)
 {
     parent::__construct($dbDriver, cssJSToolbox::$config->database->tables->backups);
 }
Beispiel #2
0
 /**
  * Override Parent::getNextId().
  */
 public function getNextId($offset = 0)
 {
     // Get post meta table name.
     $postMetaTable = $this->dbDriver->getTableName('postmeta');
     // Get all reserved blocks/metaboxes id associated with posts.
     $postMetaName = self::BLOCK_META_BOX_ID_META_NAME;
     $query = "SELECT meta_value as `value`\n\t\t\t\t\t\t\tFROM {$postMetaTable}\n\t\t\t\t\t\t\tWHERE meta_key = '{$postMetaName}';";
     // Get all ids.
     $reservedIds = array_keys($this->dbDriver->select($query, OBJECT_K));
     // Find a unique Id for the new block.
     do {
         // Increase by one until finding new unique id.
         $nextId = parent::getNextId($offset++);
     } while (in_array($nextId, $reservedIds));
     // Return new id.
     return $nextId;
 }
 /**
  * put your comment there...
  * 
  */
 public function __construct(&$dbDriver)
 {
     // Inirialize parent class.
     parent::__construct($dbDriver, cssJSToolbox::$config->database->tables->blockPins, 'blockId');
 }