示例#1
0
 /**
  * Gets the hover/alt text that appears over the validation rule icon in the form
  *
  * @return	string	label
  */
 protected function getLabel()
 {
     $params = $this->getParams();
     $cond = $params->get('emailexists_or_not');
     if ($cond == 'fail_if_not_exists') {
         return FText::_('PLG_VALIDATIONRULE_EMAILEXISTS_LABEL_NOT');
     } else {
         return parent::getLabel();
     }
 }
示例#2
0
 /**
  * Gets the hover/alt text that appears over the validation rule icon in the form
  *
  * @return	string	label
  */
 protected function getLabel()
 {
     $otherElementModel = $this->getOtherElement();
     $params = $this->getParams();
     $otherField = $params->get('areuniquevalues-otherfield');
     if ((int) $otherField !== 0) {
         return JText::sprintf('PLG_VALIDATIONRULE_AREUNIQUEVALUES_ADDITIONAL_LABEL', $otherElementModel->getElement()->label);
     } else {
         return parent::getLabel();
     }
 }