Skip to content

Instantly share code, notes, and snippets.

@philwinkle
Created August 21, 2013 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philwinkle/6300135 to your computer and use it in GitHub Desktop.
Save philwinkle/6300135 to your computer and use it in GitHub Desktop.
<?php
class Marty_Package_Helper_Data extends Mage_Core_Helper_Abstract
{
public function getYesnoHtml()
{
$options = Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray();
//if outside of a controller or block, use Mage::app()->getLayout()
return $this->getLayout()->createBlock('core/html_select')
->setName($name)
->setId($attribute->getAttributeCode())
->setTitle($this->getAttributeLabel($attribute))
->setExtraParams("")
->setValue($this->getAttributeValue($attribute))
->setOptions($options)
->getHtml();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment