Example #1
0
 /**
  * get attribute placeholders
  *
  * @access public
  * @param null $key
  * @return mixed|null|string
  * @author Marius Strajeru <*****@*****.**>
  */
 public function getPlaceholders($key = null)
 {
     if (is_null($this->_placeholders)) {
         $placeholders['{{attributeLabel}}'] = $this->getLabel();
         $placeholders['{{AttributeMagicCode}}'] = $this->getMagicMethodCode();
         $placeholders['{{attributeMagicCode}}'] = $this->getMagicMethodCode(false);
         $placeholders['{{attributeCode}}'] = $this->getCode();
         $placeholders['{{attributeColumnOptions}}'] = $this->getAdminColumnOptions();
         $placeholders['{{attributeFormType}}'] = $this->getFormType();
         $placeholders['{{attributeFormOptions}}'] = $this->getFormOptions();
         $placeholders['{{attributePreElementText}}'] = $this->getPreElementText();
         $placeholders['{{attributeRssText}}'] = $this->getRssText();
         $placeholders['{{attributeNote}}'] = $this->getNote();
         $placeholders['{{AttributeCodeForFile}}'] = $this->getCodeForFileName(true);
         $placeholders['{{attributeCodeForFile}}'] = $this->getCodeForFileName(false);
         $placeholders['{{attributeOptions}}'] = $this->getAttributeOptions();
         $placeholders['{{massActionValues}}'] = $this->getMassActionValues();
         $eventObject = new Varien_Object(array('placeholders' => $placeholders));
         Mage::dispatchEvent('umc_attribute_placeholdrers', array('event_object' => $eventObject));
         $placeholders = $eventObject->getPlaceholders();
         $this->_placeholders = $placeholders;
     }
     if (is_null($key)) {
         return $this->_placeholders;
     }
     if (isset($this->_placeholders[$key])) {
         return $this->_placeholders[$key];
     }
     return '';
 }
Example #2
0
 /**
  * get placeholders as sibling
  *
  * @access public
  * @param null $param
  * @return array|mixed|null|string
  * @author Marius Strajeru <*****@*****.**>
  */
 public function getPlaceholdersAsSibling($param = null)
 {
     if (is_null($this->_placeholdersAsSibling)) {
         $this->_placeholdersAsSibling = array();
         $this->_placeholdersAsSibling['{{sibling_default_config}}'] = $this->getDefaultConfig();
         $this->_placeholdersAsSibling['{{sibling}}'] = $this->getNameSingular(true);
         $this->_placeholdersAsSibling['{{Sibling}}'] = ucfirst($this->getNameSingular(true));
         $this->_placeholdersAsSibling['{{SIBLING}}'] = strtoupper($this->getNameSingular());
         $this->_placeholdersAsSibling['{{SiblingLabel}}'] = ucfirst($this->getLabelSingular());
         $this->_placeholdersAsSibling['{{siblingLabel}}'] = strtolower($this->getLabelSingular());
         $this->_placeholdersAsSibling['{{SiblingsLabel}}'] = ucfirst($this->getLabelPlural());
         $this->_placeholdersAsSibling['{{siblingsLabel}}'] = $this->getLabelPlural(true);
         $this->_placeholdersAsSibling['{{siblingCollectionAttributes}}'] = $this->getCollectionAttributes();
         $this->_placeholdersAsSibling['{{siblingAdminJoin}}'] = $this->getAdminJoin();
         $this->_placeholdersAsSibling['{{siblingColumnsHeader}}'] = $this->getPrepareColumnsHeader();
         $this->_placeholdersAsSibling['{{siblingNameAttributeGridEav}}'] = $this->getNameAttributeGridEav();
         $this->_placeholdersAsSibling['{{siblingNameAttributeCode}}'] = $this->getNameAttributeCode();
         $this->_placeholdersAsSibling['{{siblingNameAttributeLabel}}'] = $this->getNameAttributeLabel();
         $this->_placeholdersAsSibling['{{siblings}}'] = strtolower($this->getNamePlural());
         $this->_placeholdersAsSibling['{{Siblings}}'] = ucfirst($this->getNamePlural(true));
         $this->_placeholdersAsSibling['{{SiblingNameMagicCode}}'] = $this->getNameAttributeMagicCode();
         $this->_placeholdersAsSibling['{{SiblingViewRelationLayout}}'] = $this->getRelationLayoutXml();
         $this->_placeholdersAsSibling['{{siblingListLayout}}'] = $this->getListTemplate();
         $this->_placeholdersAsSibling['{{siblingViewLayout}}'] = $this->getViewTemplate();
         $this->_placeholdersAsSibling['{{SiblingListItem}}'] = $this->getHtmlLink();
         $this->_placeholdersAsSibling['{{siblingNameAttribute}}'] = $this->getNameAttributeCode();
         $this->_placeholdersAsSibling['{{siblingAdditionalPrepareCollection}}'] = $this->getAdditionalPrepareCollection();
         $this->_placeholdersAsSibling['{{siblingTableAlias}}'] = $this->getEntityTableAlias();
         $this->_placeholdersAsSibling['{{siblingFilterMethod}}'] = $this->getFilterMethod();
         $this->_placeholdersAsSibling['{{siblingAllAttributesToCollection}}'] = $this->getAllAttributesToCollection();
         $this->_placeholdersAsSibling['{{siblingLoadStoreId}}'] = $this->getLoadStoreId();
         $this->_placeholdersAsSibling['{{siblingToOptionArraySelect}}'] = $this->getToOptionArraySelect();
         $this->_placeholdersAsSibling['{{siblingParentStaticParams}}'] = $this->getParentStaticParams();
         $eventObject = new Varien_Object(array('placeholders' => $this->_placeholdersAsSibling));
         Mage::dispatchEvent('umc_entity_placeholdrers_as_sibling', array('event_object' => $eventObject));
         $this->_placeholdersAsSibling = $eventObject->getPlaceholders();
     }
     if (is_null($param)) {
         return $this->_placeholdersAsSibling;
     }
     if (isset($this->_placeholdersAsSibling[$param])) {
         return $this->_placeholdersAsSibling[$param];
     }
     return '';
 }