本文整理汇总了PHP中plgFabrik_Element::getLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP plgFabrik_Element::getLabel方法的具体用法?PHP plgFabrik_Element::getLabel怎么用?PHP plgFabrik_Element::getLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plgFabrik_Element
的用法示例。
在下文中一共展示了plgFabrik_Element::getLabel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLabel
/**
* write out the label for the form element
* @param object form
* @param bol encase label in <label> tag
* @param string id of element related to the label
*/
function getLabel($repeatCounter = 0, $tmpl = '')
{
$params = $this->getParams();
$element = $this->getElement();
if (!$params->get('display_showlabel', true)) {
$element->label = $this->getValue(array());
}
return parent::getLabel($repeatCounter, $tmpl);
}
示例2: getLabel
/**
* write out the label for the form element
* @param object form
* @param bol encase label in <label> tag
* @param string id of element related to the label
*/
function getLabel($repeatCounter = 0, $tmpl = '')
{
$params = $this->getParams();
if ($params->get('display_showlabel', true)) {
return parent::getLabel($repeatCounter, $tmpl);
}
$bLabel = $this->get('hasLabel');
$element = $this->getElement();
$element->label = $this->getValue(array());
$elementHTMLId = $this->getHTMLId();
if ($element->hidden) {
return '';
}
$task = JRequest::getVar('task', '', 'default');
$view = JRequest::getVar('view', '', 'form');
if ($view == 'form' && ! ( $this->canUse() || $this->canView())) {
return '';
}
$params = $this->getParams();
$elementid = "fb_el_" . $elementHTMLId;
$this->_form->loadValidationRuleClasses();
$str = '';
$rollOver = JText::_($params->get('hover_text_title')) . "::" . JText::_($params->get('rollover'));
$rollOver = htmlspecialchars($rollOver, ENT_QUOTES);
if ($this->canView()) {
$str .= "<div class=\"fabrikLabel fabrikPluginElementDisplayLabel";
$validations = $this->getValidations();
if ($this->_editable) {
foreach ($validations as $validation) {
$vid = $validation->_pluginName;
if (array_key_exists($vid, $this->_form->_validationRuleClasses)) {
if ($this->_form->_validationRuleClasses[$vid] != '') {
$str .= " " . $this->_form->_validationRuleClasses[$vid];
}
}
}
}
if ($rollOver != '::') {
$str .= " fabrikHover";
}
$str .= "\" id=\"$elementid" . "_text\">";
if ($bLabel) {
$str .= "<label for=\"$elementHTMLId\">";
}
$str .= ($rollOver != '::') ? "<span class='hasTip' title='$rollOver'>{$element->label}</span>" : $element->label;
if ($bLabel) {
$str .= "</label>";
}
$str .= "</div>\n";
}
return $str;
}
示例3: getLabel
function getLabel($repeatCounter, $tmpl = '')
{
$user = JFactory::getUser();
$params = $this->getParams();
if ($user->id != 0) {
if ($params->get('captcha-showloggedin', 0) == 0) {
return '';
}
}
return parent::getLabel($repeatCounter, $tmpl);
}