2020-05-29 13:41:58 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Model\Entity;
|
|
|
|
|
|
|
|
use App\Model\Entity\AppModel;
|
|
|
|
use Cake\ORM\Entity;
|
|
|
|
|
|
|
|
class Organisation extends AppModel
|
|
|
|
{
|
2021-06-28 14:49:38 +02:00
|
|
|
protected $_accessible = [
|
|
|
|
'*' => true,
|
|
|
|
'id' => false,
|
2022-01-26 14:24:53 +01:00
|
|
|
'created' => false
|
|
|
|
];
|
|
|
|
|
|
|
|
protected $_accessibleOnNew = [
|
|
|
|
'created' => true
|
2021-06-28 14:49:38 +02:00
|
|
|
];
|
2022-08-23 11:42:30 +02:00
|
|
|
|
2022-12-07 14:54:28 +01:00
|
|
|
public function rearrangeForAPI(array $options = []): void
|
2022-08-23 11:42:30 +02:00
|
|
|
{
|
|
|
|
if (!empty($this->tags)) {
|
|
|
|
$this->tags = $this->rearrangeTags($this->tags);
|
|
|
|
}
|
|
|
|
if (!empty($this->alignments)) {
|
|
|
|
$this->alignments = $this->rearrangeAlignments($this->alignments);
|
|
|
|
}
|
2022-12-07 14:54:28 +01:00
|
|
|
if (!empty($this->meta_fields) || !empty($this->MetaTemplates)) {
|
|
|
|
$this->rearrangeMetaFields($options);
|
2022-08-23 11:42:30 +02:00
|
|
|
}
|
|
|
|
}
|
2022-12-07 14:54:28 +01:00
|
|
|
// MetaTemplate object property is not unset!!
|
2020-05-29 13:41:58 +02:00
|
|
|
}
|