This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'abstract.php'; | |
class Mage_Shell_DataflowExport extends Mage_Shell_Abstract | |
{ | |
public function run() { | |
echo 'run!'; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function _processContent($content) | |
{ | |
$containers = $this->_processContainers($content); | |
$isProcessed = empty($containers); | |
// renew session cookie | |
$sessionInfo = Enterprise_PageCache_Model_Cache::getCacheInstance()->load($this->getSessionInfoCacheId()); | |
if ($sessionInfo) { | |
$sessionInfo = unserialize($sessionInfo); | |
foreach ($sessionInfo as $cookieName => $cookieInfo) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function processRequest() | |
{ | |
if (empty($this->_requestProcessors)) { | |
return false; | |
} | |
$content = false; | |
foreach ($this->_requestProcessors as $processor) { | |
$processor = $this->_getProcessor($processor); | |
if ($processor) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Demac_Casl_Block_Adminhtml_Newsletter_Subscriber_Grid extends Mage_Adminhtml_Block_Newsletter_Subscriber_Grid | |
{ | |
/** | |
* Prepare collection for grid | |
* | |
* @return Mage_Adminhtml_Block_Widget_Grid | |
*/ | |
protected function _prepareCollection() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Demac_Casl_Model_Observer | |
{ | |
public function addCaslDataToSubscriber($observer) | |
{ | |
$event = $observer->getEvent(); | |
$subscriber = $event->getSubscriber(); | |
$subscriberId = $subscriber->getId(); | |
if ($subscriber && $subscriberId) { | |
$model = Mage::getModel('demac_casl/subscriber'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Demac_Casl_Model_Resource_Subscriber_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract | |
{ | |
public function _construct() | |
{ | |
$this->_init('demac_casl/subscriber'); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Demac_Casl_Model_Resource_Subscriber extends Mage_Core_Model_Resource_Db_Abstract | |
{ | |
protected function _construct() | |
{ | |
$this->_init('demac_casl/subscriber', 'entity_id'); | |
} | |
public function loadBySubscriberId($subscriberId) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Demac_Casl_Model_Subscriber extends Mage_Core_Model_Abstract | |
{ | |
protected function _construct() | |
{ | |
$this->_init('demac_casl/subscriber'); | |
} | |
public function addCaslData() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$installer = $this; | |
$installer->startSetup(); | |
$installer->run("DROP TABLE IF EXISTS {$installer->getTable('demac_casl/subscriber')};"); | |
$table = $installer->getConnection() | |
->newTable($installer->getTable('demac_casl/subscriber')) | |
->addColumn('entity_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Demac_Casl> | |
<active>true</active> | |
<depends> | |
<Mage_Newsletter/> | |
</depends> | |
</Demac_Casl> |