return parent::setAttribute($key, $value);
}
- public function onRetrieved(): bool
- {
- $res = parent::onRetrieved();
- $fields = ['imageFormat', 'secureClientSidePassword', 'relay_url_params'];
- foreach ($fields as $n) {
- $f = $this->getField($n);
- if (!isset($this->{$n}) || null === $this->{$n}) {
- $this->{$n} = $f->getAttribute('default');
- }
- }
-
- return $res;
- }
-
public function onSaving(): bool
{
$this->setComposedAttributes();
$version = 3;
}
$this->version = $version;
+ $fields = ['imageFormat', 'secureClientSidePassword', 'relay_url_params'];
+ foreach ($fields as $n) {
+ $f = $this->getField($n);
+ if (null === $this->{$n}) {
+ $this->{$n} = $f->getAttribute('default');
+ }
+ }
$this->save();
DB::update('UPDATE ' . WorkshopMigration::OLD_DB . '.books SET version=' . $version . ' WHERE book_id=' . $this->id);
}
-
public function generateThumbnailsPreview($sync = false)
{
$mobilefirstFluidbookId = $this->mobilefirstFluidbookId;