コード例 #1
0
 /**
  * Adds some defaults if they're not specified
  * @param array  $fieldValues
  * @param bool   $bydb
  * @param string $timezone
  */
 protected function __construct($fieldValues = array(), $bydb = FALSE, $timezone = '')
 {
     parent::__construct($fieldValues, $bydb, $timezone);
     if (!$this->get('LIN_code')) {
         $this->set_code($this->generate_code());
     }
 }
コード例 #2
0
 /**
  * Sets some dynamic defaults
  * @param array $fieldValues
  * @param bool $bydb
  * @param string $timezone
  */
 protected function __construct($fieldValues = array(), $bydb = FALSE, $timezone = '')
 {
     if (!isset($fieldValues['slug'])) {
         $fieldValues['slug'] = $fieldValues['name'];
     }
     parent::__construct($fieldValues, $bydb, $timezone);
 }