Example #1
0
 /**
  * get social button
  *
  * @return array
  */
 public function getSocialButton()
 {
     if (Mage::helper('sociallogin')->isEnabled() && Mage::helper('sociallogin/fb')->getFbConfig('enable')) {
         $fb_data = array('button' => Mage::getBlockSingleton('sociallogin/channel_fblogin')->toHtml(), 'enabled' => Mage::helper('sociallogin/fb')->getFbConfig('enable'), 'id' => 'bt-loginfb', 'sort' => Mage::helper('sociallogin/fb')->getFbConfig('sort_order'));
         $fb_button = new Varien_Object();
         $fb_button->setData($fb_data);
         $this->buttons[$fb_button->getSort()] = $fb_button;
     }
     Mage::dispatchEvent('social_button_create_before', array('buttons' => $this->buttons, 'current' => $this));
     ksort($this->buttons);
     return $this->buttons;
 }
Example #2
0
 /**
  * add social button
  *
  * @param $block
  * @param $enable
  * @param $id
  * @param $sort
  */
 public function addSocialButton($button, $enable, $id, $sort)
 {
     $data = array('button' => $button->toHtml(), 'enabled' => $enable, 'id' => $id, 'sort' => $sort);
     $new_button = new Varien_Object();
     $new_button->setData($data);
     $this->buttons[$new_button->getSort()] = $new_button;
     if (intval($sort) > 0) {
         ksort($this->buttons);
     }
     return $this;
 }
 protected function _prepareArrayRow(Varien_Object $row)
 {
     $row->setData('option_extra_attr_' . $this->getRenderer('attribute')->calcOptionHash($row->getAttribute()), 'selected="selected"');
     $row->setData('option_extra_attr_' . $this->getRenderer('sort')->calcOptionHash($row->getSort()), 'selected="selected"');
 }