protected function _actionsToHtml(array $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4)
 {
     $_e60edee9bbcec9af2084c09a7e3e3bf5a0643e9f = array();
     $_409b25694252ac5f5222c4b2856609468337b2c1 = new Varien_Object();
     foreach ($_b4b4ae1cce58b916954ba6a30ef73681af8a36c4 as $_726da6d3022af6314a6aa35c59981f2654ef1b69) {
         $_409b25694252ac5f5222c4b2856609468337b2c1->setData($_726da6d3022af6314a6aa35c59981f2654ef1b69['@']);
         $_e60edee9bbcec9af2084c09a7e3e3bf5a0643e9f[] = '<a ' . $_409b25694252ac5f5222c4b2856609468337b2c1->serialize() . '>' . $_726da6d3022af6314a6aa35c59981f2654ef1b69['#'] . '</a>';
     }
     return implode('<span class="separator">&nbsp;|&nbsp;</span>', $_e60edee9bbcec9af2084c09a7e3e3bf5a0643e9f);
 }
Example #2
0
 protected function _actionsToHtml(array $actions)
 {
     $html = array();
     $attributesObject = new Varien_Object();
     foreach ($actions as $action) {
         $attributesObject->setData($action['@']);
         $html[] = '<a ' . $attributesObject->serialize() . '>' . $action['#'] . '</a>';
     }
     return implode(' <span class="separator">&nbsp;|&nbsp;</span> ', $html);
 }
Example #3
0
 protected function _actionsToHtml(array $actions)
 {
     $html = array();
     $attributesObject = new Varien_Object();
     foreach ($actions as $action) {
         $attributesObject->setData($action['@']);
         $html[] = '<a ' . $attributesObject->serialize() . '>' . $action['#'] . '</a>';
     }
     return implode($html);
 }
Example #4
0
 /**
  * @param array $actions
  * @return string
  */
 protected function _actionsToHtml(array $actions)
 {
     //Mage::helper('reportsviewer')->log(sprintf("%s->actions=%s", __METHOD__, print_r($actions, true)) );
     $html = array();
     $attributesObject = new Varien_Object();
     foreach ($actions as $action) {
         $attributesObject->setData($action['@']);
         $html[] = '<a ' . $attributesObject->serialize() . '>' . $action['#'] . '</a>';
     }
     return implode(' <span class="separator">&nbsp;|&nbsp;</span> ', $html);
 }
Example #5
0
 /**
  * Render single action as link html
  *
  * @param array $action
  * @param Varien_Object $row
  * @return string
  */
 protected function _toLinkHtml($action, Varien_Object $row)
 {
     $actionAttributes = new Varien_Object();
     $actionCaption = '';
     $this->_transformActionData($action, $actionCaption, $row);
     if (isset($action['confirm'])) {
         $action['onclick'] = 'return window.confirm(\'' . addslashes($this->escapeHtml($action['confirm'])) . '\')';
         unset($action['confirm']);
     }
     $actionAttributes->setData($action);
     return '<a ' . $actionAttributes->serialize() . '>' . $actionCaption . '</a>';
 }
Example #6
0
 /**
  * Render options array as a HTML string
  *
  * @param array $actions
  * @return string
  */
 protected function _actionsToHtml(array $actions = array())
 {
     $html = array();
     $attributesObject = new Varien_Object();
     if (empty($actions)) {
         $actions = $this->_actions;
     }
     foreach ($actions as $action) {
         $attributesObject->setData($action['@']);
         $html[] = '<a ' . $attributesObject->serialize() . '>' . $action['#'] . '</a>';
     }
     return implode($html, '<span class="separator">|</span>');
 }
Example #7
0
 public function createTransaction($amount = 0, $action = '', $title = '', $customer = null, $rewardCustomer = null, $extraContent = array())
 {
     $expiration_date = null;
     if ($amount > 0) {
         $expiration_date = isset($extraContent['expiration_date']) ? $extraContent['expiration_date'] : $this->getExpirationDate();
     }
     if (isset($extraContent['notice'])) {
         $extraContent['notice'] = htmlspecialchars($extraContent['notice']);
     }
     if (is_array($extraContent['extra_content'])) {
         $extra_content = new Varien_Object($extraContent['extra_content']);
         $extraContent['extra_content'] = $extra_content->serialize(null, '=', '&', '');
     }
     $this->addData($extraContent)->setTitle($title)->setCustomerId($customer->getId())->setAction($action)->setCreateAt(Mage::getModel('core/date')->gmtDate())->setExpirationDate($expiration_date)->setPointsChange($amount)->setPointsSpent(0)->setIsExpired(0)->save();
     if (is_array($extraContent['customer_extra_content'])) {
         parse_str($rewardCustomer->getExtraContent(), $current_customer_extra_content);
         $customerExtraContent = new Varien_Object($current_customer_extra_content);
         $customerExtraContent->addData($extraContent['customer_extra_content']);
         $rewardCustomer->setExtraContent($customerExtraContent->serialize(null, '=', '&', ''));
     }
     $rewardCustomer->setTotalPoints($rewardCustomer->getTotalPoints() + $amount)->save();
     return $this;
 }
Example #8
0
 /**
  * Tests Varien_Object->serialize()
  */
 public function testSerialize()
 {
     $this->_object->setData(array('key1' => 'value1', 'key2' => 'value2'));
     $this->assertEquals('key1="value1" key2="value2"', $this->_object->serialize());
     $this->assertEquals('key1:\'value1\'_key2:\'value2\'', $this->_object->serialize(array('key', 'key1', 'key2'), ':', '_', '\''));
 }
Example #9
0
 public function serialize($attributes = array(), $valueSeparator = '=', $fieldSeparator = ' ', $quote = '"')
 {
     if (empty($attributes)) {
         $attributes = array_keys(self::$STEP_OBJECT);
     }
     return parent::serialize($attributes, $valueSeparator, $fieldSeparator, $quote);
 }