public function __construct($record, $childClass, $childFk, $childPluralized)
 {
     parent::__construct($record);
     $this->childClass = $childClass;
     $this->childFk = $childFk;
     $this->pluralized = $childPluralized;
 }
Example #2
0
 public function __construct(Omeka_Record_AbstractRecord $record)
 {
     parent::__construct($record);
     $this->_type = get_class($record);
     $db = $this->_record->getDb();
     $this->_tagTable = $db->getTable('Tag');
     $this->_joinTable = $db->getTable('RecordsTags');
 }
 function __construct($record, $options = array())
 {
     parent::__construct($record);
     $defaultOptions = array('parentFields' => array(), 'slugMaxLength' => 30, 'slugSeedFieldName' => 'title');
     $errorMsgs = array('slugEmptyErrorMessage' => 'Slug must be provided.', 'slugLengthErrorMessage' => 'Slug must not be more than ' . $defaultOptions['slugMaxLength'] . ' characters.', 'slugUniqueErrorMessage' => 'Slug must be unique.');
     // Options passed in will override the defaults.
     $this->options = array_merge($defaultOptions, $errorMsgs, $options);
     $this->_parentFields = $this->options['parentFields'];
     $this->_record = $record;
 }
Example #4
0
 /**
  * Constructor
  * 
  * @param Omeka_Record_AbstractRecord $record The underlying record
  */
 public function __construct($record)
 {
     parent::__construct($record);
     $this->_wasPublic = $this->isPublic();
     $this->_wasFeatured = $this->isFeatured();
 }
Example #5
0
 public function __construct($record, $column = 'owner_id')
 {
     parent::__construct($record);
     $this->_column = $column;
 }
Example #6
0
 /**
  * Initialize the mixin.
  *
  * Setting either of the column parameters to null will skip updating that
  * timestamp. The default column names are 'updated' and 'added'.
  *
  * @param Omeka_Record_AbstractRecord $record
  * @param string $addedColumn Name of the column holding the "added" timestamp.
  * @param string $updatedColumn Name of the column holding the "modified" timestamp.
  */
 public function __construct($record, $addedColumn = 'added', $modifiedColumn = 'modified')
 {
     parent::__construct($record);
     $this->_addedColumn = $addedColumn;
     $this->_modifiedColumn = $modifiedColumn;
 }