hooksDisabled
This commit is contained in:
@@ -90,9 +90,11 @@ class Database extends RDBRepository
|
||||
$this->applicationState = $applicationState;
|
||||
$this->recordIdGenerator = $recordIdGenerator;
|
||||
|
||||
$hooksDisabled = $this->hooksDisabled || $metadata->get("entityDefs.$entityType.hooksDisabled");
|
||||
|
||||
$hookMediator = null;
|
||||
|
||||
if (!$this->hooksDisabled) {
|
||||
if (!$hooksDisabled) {
|
||||
$hookMediator = new HookMediator($hookManager);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2024 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Repositories;
|
||||
|
||||
/**
|
||||
* @extends \Espo\Core\Repositories\Database<\Espo\Entities\ActionHistoryRecord>
|
||||
*/
|
||||
class ActionHistoryRecord extends \Espo\Core\Repositories\Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
}
|
||||
@@ -42,8 +42,6 @@ use LogicException;
|
||||
*/
|
||||
class ArrayValue extends Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
|
||||
private const ITEM_MAX_LENGTH = 100;
|
||||
|
||||
public function storeEntityAttribute(CoreEntity $entity, string $attribute, bool $populateMode = false): void
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2024 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Repositories;
|
||||
|
||||
/**
|
||||
* @extends \Espo\Core\Repositories\Database<\Espo\Core\ORM\Entity>
|
||||
*/
|
||||
class AuthFailLogRecord extends \Espo\Core\Repositories\Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2024 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Repositories;
|
||||
|
||||
/**
|
||||
* @extends \Espo\Core\Repositories\Database<\Espo\Entities\AuthLogRecord>
|
||||
*/
|
||||
class AuthLogRecord extends \Espo\Core\Repositories\Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2024 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Repositories;
|
||||
|
||||
/**
|
||||
* @extends \Espo\Core\Repositories\Database<\Espo\Entities\AuthToken>
|
||||
*/
|
||||
class AuthToken extends \Espo\Core\Repositories\Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
}
|
||||
@@ -51,8 +51,6 @@ class EmailAddress extends Database implements
|
||||
use Di\AclManagerSetter;
|
||||
use Di\ConfigSetter;
|
||||
|
||||
protected $hooksDisabled = true;
|
||||
|
||||
private const LOOKUP_SMALL_MAX_SIZE = 20;
|
||||
private const LOOKUP_MAX_SIZE = 50;
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2024 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Repositories;
|
||||
|
||||
/**
|
||||
* @extends \Espo\Core\Repositories\Database<\Espo\Entities\Extension>
|
||||
*/
|
||||
class Extension extends \Espo\Core\Repositories\Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
}
|
||||
@@ -44,8 +44,6 @@ class Job extends Database implements
|
||||
{
|
||||
use Di\ConfigSetter;
|
||||
|
||||
protected $hooksDisabled = true;
|
||||
|
||||
/**
|
||||
* @param JobEntity $entity
|
||||
*/
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2024 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Repositories;
|
||||
|
||||
use Espo\Core\Repositories\Database;
|
||||
|
||||
/**
|
||||
* @extends Database<\Espo\Entities\NextNumber>
|
||||
*/
|
||||
class NextNumber extends Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
}
|
||||
@@ -52,8 +52,6 @@ class PhoneNumber extends Database implements
|
||||
use Di\AclManagerSetter;
|
||||
use Di\ConfigSetter;
|
||||
|
||||
protected $hooksDisabled = true;
|
||||
|
||||
private const ERASED_PREFIX = 'ERASED:';
|
||||
|
||||
private const LOOKUP_SMALL_MAX_SIZE = 20;
|
||||
|
||||
@@ -39,8 +39,6 @@ use Espo\Core\Repositories\Database;
|
||||
*/
|
||||
class UniqueId extends Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
|
||||
public function getNew(): Entity
|
||||
{
|
||||
$entity = parent::getNew();
|
||||
|
||||
@@ -38,8 +38,6 @@ use Espo\Core\Repositories\Database;
|
||||
*/
|
||||
class Webhook extends Database
|
||||
{
|
||||
protected $hooksDisabled = true;
|
||||
|
||||
protected function beforeSave(Entity $entity, array $options = [])
|
||||
{
|
||||
if ($entity->isNew()) {
|
||||
|
||||
@@ -72,5 +72,6 @@
|
||||
"order": "asc",
|
||||
"textFilterFields": ["ipAddress", "userName"],
|
||||
"countDisabled": true
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -20,5 +20,6 @@
|
||||
"entityValue": {
|
||||
"columns": ["entityType", "entityId", "value"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -105,5 +105,6 @@
|
||||
"requestTime": {
|
||||
"columns": ["requestTime"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -74,5 +74,6 @@
|
||||
"token": {
|
||||
"columns": ["token", "deleted"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
"notStorable": true
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
},
|
||||
"links": {},
|
||||
"collection": {
|
||||
"orderBy": "name",
|
||||
"order": "asc"
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -55,5 +55,6 @@
|
||||
"collection": {
|
||||
"orderBy": "createdAt",
|
||||
"order": "desc"
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -133,5 +133,6 @@
|
||||
"statusScheduledJobId": {
|
||||
"columns": ["status", "scheduledJobId"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -18,5 +18,6 @@
|
||||
"entityTypeFieldName": {
|
||||
"columns": ["entityType", "fieldName"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
"notStorable": true
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
},
|
||||
"links": {},
|
||||
"collection": {
|
||||
"orderBy": "name",
|
||||
"order": "asc"
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -35,5 +35,6 @@
|
||||
"collection": {
|
||||
"orderBy": "createdAt",
|
||||
"order": "desc"
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -93,5 +93,6 @@
|
||||
"entityTypeField": {
|
||||
"columns": ["entityType", "field"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"hooksDisabled": true
|
||||
}
|
||||
|
||||
@@ -84,6 +84,10 @@
|
||||
"type": "boolean",
|
||||
"description": "Do not add the `deleted` attribute."
|
||||
},
|
||||
"hooksDisabled": {
|
||||
"type": "boolean",
|
||||
"description": "Disable hooks. As of v8.2."
|
||||
},
|
||||
"entityClassName": {
|
||||
"type": "string",
|
||||
"description": "An entity. Should implement Espo\\ORM\\Entity. Usually should extend Espo\\Core\\ORM\\Entity. As of v8.2."
|
||||
|
||||
Reference in New Issue
Block a user