Exemple #1
0
 /**
  * Function to get editable fields from this module
  * @return <Array> list of editable fields
  */
 public function getEditableFields()
 {
     $fieldsList = array(array('name' => 'providertype', 'label' => 'Provider', 'type' => 'picklist'), array('name' => 'isactive', 'label' => 'Active', 'type' => 'radio'), array('name' => 'username', 'label' => 'User Name', 'type' => 'text'), array('name' => 'password', 'label' => 'Password', 'type' => 'password'));
     $fieldModelsList = array();
     foreach ($fieldsList as $fieldInfo) {
         $fieldModelsList[$fieldInfo['name']] = Settings_SMSNotifier_Field_Model::getInstanceByRow($fieldInfo);
     }
     return $fieldModelsList;
 }
 /**
  * Function to get Editable fields for this instance
  * @return <Array> field models list <Settings_SMSNotifier_Field_Model>
  */
 public function getEditableFields()
 {
     $editableFieldsList = $this->getModule()->getEditableFields();
     $id = $this->getId();
     if ($id) {
         $parameters = Zend_Json::decode(decode_html($this->get('parameters')));
         foreach ($parameters as $fieldName => $fieldValue) {
             $fieldInfo = array('name' => $fieldName, 'label' => $fieldName, 'type' => 'text');
             $editableFieldsList[$fieldName] = Settings_SMSNotifier_Field_Model::getInstanceByRow($fieldInfo);
         }
     }
     return $editableFieldsList;
 }