new: [appmodel] moved constants related to the logging along with a getter to app model

pull/92/head
iglocska 2021-11-17 15:58:06 +01:00
parent fe8e217d61
commit ff77af0a8e
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 22 additions and 0 deletions

View File

@ -6,6 +6,28 @@ use Cake\ORM\Entity;
class AppModel extends Entity class AppModel extends Entity
{ {
const BROTLI_HEADER = "\xce\xb2\xcf\x81";
const BROTLI_MIN_LENGTH = 200;
const ACTION_ADD = 'add',
ACTION_EDIT = 'edit',
ACTION_SOFT_DELETE = 'soft_delete',
ACTION_DELETE = 'delete',
ACTION_UNDELETE = 'undelete',
ACTION_TAG = 'tag',
ACTION_TAG_LOCAL = 'tag_local',
ACTION_REMOVE_TAG = 'remove_tag',
ACTION_REMOVE_TAG_LOCAL = 'remove_local_tag',
ACTION_LOGIN = 'login',
ACTION_LOGIN_FAIL = 'login_fail',
ACTION_LOGOUT = 'logout';
public function getConstant($name)
{
return constant('self::' . $name);
}
public function getAccessibleFieldForNew(): array public function getAccessibleFieldForNew(): array
{ {
return $this->_accessibleOnNew ?? []; return $this->_accessibleOnNew ?? [];