public function populateDefaults() { $defaults = $this->owner->config()->get('defaults'); if (isset($defaults['ShowInSiteMap']) && $defaults['ShowInSiteMap'] == 0) { $this->owner->ShowInSiteMap = 0; } else { if ($this->owner->ClassName != 'ErrorPage' && $this->owner->ClassName != 'BlogEntry') { $this->owner->ShowInSiteMap = 1; } } parent::populateDefaults(); }
public function populateDefaults() { parent::populateDefaults(); $this->Loop = 1; $this->Animate = 1; }
/** * Sets the Date field to the current date. */ public function populateDefaults() { $this->owner->ExpiryDate = date('Y-m-d', strtotime('+1 year')); $this->owner->Notified = 0; parent::populateDefaults(); }
public function populateDefaults() { $this->owner->URLSegment = "new-" . strtolower($this->owner->ClassName); $this->owner->Title = "New " . strtolower($this->owner->ClassName); parent::populateDefaults(); }
public function populateDefaults() { parent::populateDefaults(); $this->owner->MobileDomain = 'm.' . $_SERVER['HTTP_HOST']; $this->owner->FullSiteDomain = $_SERVER['HTTP_HOST']; }
public function populateDefaults() { $this->HTMLTagLine = _t('SiteConfig.TAGLINEDEFAULT', '<p>your tagline here</p>'); // Allow these defaults to be overridden parent::populateDefaults(); }