true/false */ public function isViewable() { return true; } /** * Function to get instance of Field by using array of data * @param $rowData * @return FieldModel */ static public function getInstanceByRow($rowData) { $fieldModel = new self(); foreach ($rowData as $name => $value) { $fieldModel->set($name, $value); } return $fieldModel; } /** * Function to check whether this field editable or not * @return true/false */ public function isEditable() { if (($this->getName() === 'publicid') || ($this->getName() === 'posturl')) { return false; } return true; } public function isReadOnly() { if ($this->getName() === 'name') { return $this->get('readonly'); } return false; } /** * Function to get the value of a given property * @param $propertyName * @return * @throws Exception */ public function get($propertyName) { if($propertyName == 'fieldvalue' && $this->name == 'roundrobin_userid') { $value = str_replace('"', '"', $this->$propertyName); return json_decode($value,true); } return parent::get($propertyName); } /** * Function to get Picklist values * @return Picklist values */ public function getPicklistValues() { if ($this->getName() === 'targetmodule') { return Settings_Webforms_Module_Model::getsupportedModulesList(); } return array(); } public function getDisplayValue($value) { if ($this->getName() === 'enabled') { $moduleName = 'Settings:Webforms'; if ($value) { return vtranslate('LBL_ACTIVE', $moduleName); } return vtranslate('LBL_INACTIVE', $moduleName); } return parent::getDisplayValue($value); } public function getPermissions() { return true; } /** * Function which will check if empty piclist option should be given */ public function isEmptyPicklistOptionAllowed() { return false; } }