Пример #1
0
 /**
  * Constructor
  *
  * @param \Zend\Db\Adapter\Adapter $adapter Database adapter
  */
 public function __construct($adapter)
 {
     parent::__construct('id', 'resource', $adapter);
 }
Пример #2
0
 /**
  * Destroy the list.
  *
  * @param \VuFind\Db\Row\User|bool $user  Logged-in user (false if none)
  * @param bool                     $force Should we force the delete without
  * checking permissions?
  *
  * @return int The number of rows deleted.
  */
 public function delete($user = false, $force = false)
 {
     if (!$force && !$this->editAllowed($user)) {
         throw new ListPermissionException('list_access_denied');
     }
     // Remove user_resource and resource_tags rows:
     $userResource = $this->getDbTable('UserResource');
     $userResource->destroyLinks(null, $this->user_id, $this->id);
     // Remove the list itself:
     return parent::delete();
 }
Пример #3
0
 /**
  * Constructor
  *
  * @param \Zend\Db\Adapter\Adapter $adapter Database adapter
  */
 public function __construct($adapter)
 {
     parent::__construct('id', 'finna_comments_record', $adapter);
 }
 /**
  * Constructor
  *
  * @param \Zend\Db\Adapter\Adapter $adapter Database adapter
  */
 public function __construct($adapter)
 {
     parent::__construct('id', 'finna_comments_inappropriate', $adapter);
 }
Пример #5
0
 /**
  * Destroy the user.
  *
  * @return int The number of rows deleted.
  */
 public function delete()
 {
     // Remove all lists owned by the user:
     $lists = $this->getLists();
     $table = $this->getDbTable('UserList');
     foreach ($lists as $current) {
         // The rows returned by getLists() are read-only, so we need to retrieve
         // a new object for each row in order to perform a delete operation:
         $list = $table->getExisting($current->id);
         $list->delete($this, true);
     }
     // Remove the user itself:
     return parent::delete();
 }
Пример #6
0
 /**
  * Constructor
  *
  * @param \Zend\Db\Adapter\Adapter $adapter Database adapter
  */
 public function __construct($adapter)
 {
     parent::__construct('id', 'finna_fee', $adapter);
 }
Пример #7
0
 /**
  * Constructor
  *
  * @param \Zend\Db\Adapter\Adapter $adapter Database adapter
  */
 public function __construct($adapter)
 {
     parent::__construct('id', 'finna_due_date_reminder', $adapter);
 }
Пример #8
0
 /**
  * Constructor
  *
  * @param \Zend\Db\Adapter\Adapter $adapter Database adapter
  */
 public function __construct($adapter)
 {
     parent::__construct('id', 'tags', $adapter);
 }
Пример #9
0
 /**
  * Constructor
  *
  * @param \Zend\Db\Adapter\Adapter $adapter Database adapter
  */
 public function __construct($adapter)
 {
     parent::__construct('id', 'record_status', $adapter);
 }
Пример #10
0
 /**
  * Constructor
  *
  * @param \Zend\Db\Adapter\Adapter $adapter Database adapter
  */
 public function __construct($adapter)
 {
     parent::__construct('id', 'finna_metalib_search', $adapter);
 }