Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some event-prefixes, ref #249 #423

Closed
wants to merge 11 commits into from
8 changes: 8 additions & 0 deletions app/code/core/Mage/Admin/Model/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
*/
class Mage_Admin_Model_Block extends Mage_Core_Model_Abstract
{
/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'admin_block';

/**
* Initialize variable model
*/
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Admin/Model/Variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
*/
class Mage_Admin_Model_Variable extends Mage_Core_Model_Abstract
{
/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'admin_variable';

/**
* Initialize variable model
*/
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/AdminNotification/Model/Inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ class Mage_AdminNotification_Model_Inbox extends Mage_Core_Model_Abstract
public const SEVERITY_MINOR = 3;
public const SEVERITY_NOTICE = 4;

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'adminnotification_inbox';

protected function _construct()
{
$this->_init('adminnotification/inbox');
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Adminhtml/Model/Email/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ class Mage_Adminhtml_Model_Email_Template extends Mage_Core_Model_Email_Template
*/
public const XML_PATH_TEMPLATE_EMAIL = '//sections/*/groups/*/fields/*[source_model="adminhtml/system_config_source_email_template"]';

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'adminhtml_email_template';

/**
* Collect all system config pathes where current template is used as default
*
Expand Down
7 changes: 7 additions & 0 deletions app/code/core/Mage/Api/Model/Roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ class Mage_Api_Model_Roles extends Mage_Core_Model_Abstract
*/
protected $_filters;

/**
* Model event prefix
*
* @var string
*/
protected $_eventPrefix = 'api_roles';

protected function _construct()
{
$this->_init('api/roles');
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Api/Model/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
*/
class Mage_Api_Model_Rules extends Mage_Core_Model_Abstract
{
/**
* Prefix of model events names
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'api_rules';

protected function _construct()
{
$this->_init('api/rules');
Expand Down
11 changes: 11 additions & 0 deletions app/code/core/Mage/Api2/Model/Acl/Filter/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ class Mage_Api2_Model_Acl_Filter_Attribute extends Mage_Core_Model_Abstract
*/
protected $_permissionModel;

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'api2_acl_filter_attribute';

/**
* Initialize resource model
*/
protected function _construct()
{
$this->_init('api2/acl_filter_attribute');
Expand Down
11 changes: 11 additions & 0 deletions app/code/core/Mage/Api2/Model/Acl/Global/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ class Mage_Api2_Model_Acl_Global_Role extends Mage_Core_Model_Abstract
*/
protected $_permissionModel;

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'api2_acl_global_role';

/**
* Initialize resource model
*/
protected function _construct()
{
$this->_init('api2/acl_global_role');
Expand Down
11 changes: 11 additions & 0 deletions app/code/core/Mage/Api2/Model/Acl/Global/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ class Mage_Api2_Model_Acl_Global_Rule extends Mage_Core_Model_Abstract
*/
public const RESOURCE_ALL = 'all';

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'api2_acl_global_rule';

/**
* Initialize resource model
*/
protected function _construct()
{
$this->_init('api2/acl_global_rule');
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ class Mage_Api2_Model_Acl_Global_Rule_Tree extends Mage_Core_Helper_Abstract
*/
protected $_hasEntityOnlyAttributes = false;

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'api2_acl_global_rule_tree';

/**
* Constructor
*
Expand Down
12 changes: 12 additions & 0 deletions app/code/core/Mage/Bundle/Model/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ class Mage_Bundle_Model_Option extends Mage_Core_Model_Abstract
*/
protected $_defaultSelection = null;

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'bundle_option';

/**
* Initialize resource model
*
*/
protected function _construct()
{
$this->_init('bundle/option');
Expand Down
11 changes: 11 additions & 0 deletions app/code/core/Mage/Bundle/Model/Selection.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@
*/
class Mage_Bundle_Model_Selection extends Mage_Core_Model_Abstract
{
/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'bundle_selection';

/**
* Initialize resource model
*/
protected function _construct()
{
$this->_init('bundle/selection');
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Catalog/Model/Product/Flat/Flag.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ class Mage_Catalog_Model_Product_Flat_Flag extends Mage_Core_Model_Flag
*/
protected $_flagCode = 'catalog_product_flat';

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'catalog_product_flat_flag';

/**
* Retrieve flag data array
*
Expand Down
11 changes: 11 additions & 0 deletions app/code/core/Mage/Catalog/Model/Product/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@ class Mage_Catalog_Model_Product_Option extends Mage_Core_Model_Abstract
*/
protected $_values = [];

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'catalog_product_option';

/**
* Constructor
*/
protected function _construct()
{
$this->_init('catalog/product_option');
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Catalog/Model/Product/Option/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ class Mage_Catalog_Model_Product_Option_Value extends Mage_Core_Model_Abstract

protected $_option;

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'catalog_product_option_value';

protected function _construct()
{
$this->_init('catalog/product_option_value');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@
*/
class Mage_Catalog_Model_Product_Type_Configurable_Attribute extends Mage_Core_Model_Abstract
{
/**
* Model event prefix
*
* @var string
*/
protected $_eventPrefix = 'catalog_product_type_configurable_attribute';

/**
* Initialize resource model
*
*/
protected function _construct()
{
$this->_init('catalog/product_type_configurable_attribute');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
*/
class Mage_Catalog_Model_Resource_Collection_Abstract extends Mage_Eav_Model_Entity_Collection_Abstract
{
/**
* Model event prefix
*
* @var string
*/
protected $_eventPrefix = 'catalog_resource_collection_abstract';

/**
* Current scope (store Id)
*
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/CatalogRule/Model/Flag.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,12 @@ class Mage_CatalogRule_Model_Flag extends Mage_Core_Model_Flag
* @var string
*/
protected $_flagCode = 'catalog_rules_dirty';

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'catalogrule_flag';
}
8 changes: 8 additions & 0 deletions app/code/core/Mage/Checkout/Model/Agreement.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
*/
class Mage_Checkout_Model_Agreement extends Mage_Core_Model_Abstract
{
/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'checkout_agreement';

protected function _construct()
{
$this->_init('checkout/agreement');
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Cms/Model/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ class Mage_Cms_Model_Block extends Mage_Core_Model_Abstract
public const CACHE_TAG = 'cms_block';
protected $_cacheTag = 'cms_block';

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'cms_block';

protected function _construct()
{
$this->_init('cms/block');
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Core/Model/Design.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
*/
class Mage_Core_Model_Design extends Mage_Core_Model_Abstract
{
/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'core_design';

protected function _construct()
{
$this->_init('core/design');
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Core/Model/Email/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ class Mage_Core_Model_Email_Queue extends Mage_Core_Model_Abstract
*/
protected $_recipients = [];

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'core_email_queue';

/**
* Initialize object
*/
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Core/Model/File/Storage/Flag.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class Mage_Core_Model_File_Storage_Flag extends Mage_Core_Model_Flag
*/
protected $_flagCode = 'synchronize';

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'core_file_storage_flag';

/**
* Pass error to flag
*
Expand Down
8 changes: 8 additions & 0 deletions app/code/core/Mage/Core/Model/Flag.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ class Mage_Core_Model_Flag extends Mage_Core_Model_Abstract
*/
protected $_flagCode = null;

/**
* Model event prefix
*
* @see Mage_Core_Model_Abstract::$_eventPrefix
* @var string
*/
protected $_eventPrefix = 'core_flag';

/**
* Init resource model
* Set flag_code if it is specified in arguments
Expand Down
Loading