Beispiel #1
0
 /**
  * Function to get list of Blocks
  * @return <Array> list of Block models <Settings_Webforms_Block_Model>
  */
 public function getBlocks()
 {
     if (empty($this->blocks)) {
         $this->blocks = Settings_Webforms_Block_Model::getAllForModule($this);
     }
     return $this->blocks;
 }
Beispiel #2
0
 /**
  * Function to get list of all blocks for selected module
  * @param <Settings_Webforms_Module_Model> $moduleModel
  * @return <Array> list of Block models
  */
 public static function getAllForModule($moduleModel)
 {
     $blockLabels = array('LBL_WEBFORM_INFORMATION', 'LBL_ASSIGN_USERS');
     foreach ($blockLabels as $blockName) {
         $blockModels[$blockName] = Settings_Webforms_Block_Model::getInstanceFromName($blockName, $moduleModel);
     }
     return $blockModels;
 }