public function __construct($model = 'pages') { if (empty($this->label)) { unset($this->label); } if (empty($this->template)) { unset($this->template); } parent::__construct($model); }
/** * The {@link $excerpt} property is unset if it is empty, until it is defined again, the * {@link get_excerpt()} getter provides a default value made from the {@link $body} * property. * * @param Model|string $model Defaults to "contents". */ public function __construct($model = 'contents') { if (empty($this->excerpt)) { unset($this->excerpt); } parent::__construct($model); }