本文整理汇总了PHP中FormHelper::checkDisplay方法的典型用法代码示例。如果您正苦于以下问题:PHP FormHelper::checkDisplay方法的具体用法?PHP FormHelper::checkDisplay怎么用?PHP FormHelper::checkDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormHelper
的用法示例。
在下文中一共展示了FormHelper::checkDisplay方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if (task == 'cancel' || document.formvalidator.isValid(document.id('nameForm'))) {
Joomla.submitform(task, document.getElementById('nameForm'));
} else {
jtrefnot(1);
alert('<?php
echo $this->escape(JText::_('JT_VALIDATION_FORM_FAILED'));
?>
');
}
}
</script>
<!-- set up counters and other necessities -->
<?php
$namCnt = 0;
$this->form->setValue('living', 'person', $this->lists['indLiving']);
$display = FormHelper::checkDisplay('name', $this->lists['indLiving']);
?>
<script type="text/javascript">
<?php
echo FormHelper::getNameEventRowScript('personName', $this->form, $this->lists['appId']);
?>
<?php
echo FormHelper::getReferenceRowScript($this->form, $this->lists['appId']);
?>
<?php
echo FormHelper::getNoteRowScript(false, $this->form, $this->lists['appId']);
?>
<?php
echo FormHelper::getGeneralRowScript();
?>
示例2: defined
<?php
defined('_JEXEC') or die('Restricted access');
?>
<?php
$html = '';
$indEvents = false;
$events = $this->person->getPersonEvents();
// Button for editing (only active with AJAX)
if ($this->lists['technology'] != 'b' && $this->lists['technology'] != 'j') {
if (is_object($this->canDo)) {
$display = FormHelper::checkDisplay('person', $this->person->living);
if ($display) {
$html .= '<div class="jt-edit-2" style="text-align: right;">';
if ($this->canDo->get('core.edit')) {
$html .= '<a href="#" onclick="jtsubmitbutton(\'edit\', \'pevents\');" >';
$html .= JText::_('JT_EDITEVENTS');
$html .= '</a>';
} else {
$html .= '<span class="jt-edit-nolink" title="' . JText::_('JT_NOPERMISSION_DESC') . '" >';
$html .= JText::_('JT_EDITEVENTS');
$html .= '</span>';
}
$html .= ' |';
$html .= '</div>';
}
}
}
$i = 0;
foreach ($events as $event) {
示例3:
{
if (task == 'cancel' || document.formvalidator.isValid(document.id('noteForm'))) {
Joomla.submitform(task, document.getElementById('noteForm'));
} else {
jtrefnot(1);
alert('<?php
echo $this->escape(JText::_('JT_VALIDATION_FORM_FAILED'));
?>
');
}
}
</script>
<!-- set up counters and other necessities -->
<?php
$this->form->setValue('living', 'person', $this->lists['indLiving']);
$display = FormHelper::checkDisplay('person', $this->lists['indLiving'], 'NOTE');
?>
<script type="text/javascript">
<?php
echo FormHelper::getReferenceRowScript($this->form, $this->lists['appId']);
?>
<?php
echo FormHelper::getNoteRowScript(true, $this->form, $this->lists['appId']);
?>
<?php
echo FormHelper::getGeneralRowScript();
?>
</script>
示例4:
?>
<?php
$html = '';
// start with the name of the person
$html .= '<div class="jt-h1" style="float: left; width: 85%;">';
$html .= !empty($this->person->prefix) ? $this->person->prefix . ' ' : '';
$html .= $this->person->firstNamePatronym . ' ' . $this->person->familyName;
$html .= !empty($this->person->suffix) ? ' ' . $this->person->suffix : '';
$html .= '</div>';
// Button for editing (only active with AJAX)
if ($this->lists['technology'] != 'b' && $this->lists['technology'] != 'j') {
if (is_object($this->canDo)) {
$html .= '<div class="jt-edit-2" style="text-align: right;">';
$displayNot = FormHelper::checkDisplay('person', $this->person->living, 'NOTE');
$displayRef = FormHelper::checkDisplay('person', $this->person->living, 'SOUR');
if ($this->canDo->get('core.edit')) {
$html .= '<a href="#" onclick="jtsubmitbutton(\'edit\', \'names\');" >';
$html .= JText::_('JT_EDITNAMES');
$html .= '</a> |<br />';
if ($displayNot) {
$html .= '<a href="#" onclick="jtsubmitbutton(\'edit\', \'notes\');" >';
$html .= JText::_('JT_EDITNOTES');
$html .= '</a> |<br />';
}
if ($displayRef) {
$html .= '<a href="#" onclick="jtsubmitbutton(\'edit\', \'references\');" >';
$html .= JText::_('JT_EDITREFS');
$html .= '</a> |<br />';
}
} else {
示例5:
if (task == 'cancel' || document.formvalidator.isValid(document.id('reventForm'))) {
Joomla.submitform(task, document.getElementById('reventForm'));
} else {
jtrefnot(1);
alert('<?php
echo $this->escape(JText::_('JT_VALIDATION_FORM_FAILED'));
?>
');
}
}
</script>
<!-- set up counters and other necessities -->
<?php
$evtCnt = 0;
$this->form->setValue('living', 'person', $this->lists['indLiving']);
$display = FormHelper::checkDisplay('relation', $this->lists['indLiving']);
?>
<script type="text/javascript">
<?php
echo FormHelper::getNameEventRowScript('relationEvent', $this->form, $this->lists['appId']);
?>
<?php
echo FormHelper::getReferenceRowScript($this->form, $this->lists['appId']);
?>
<?php
echo FormHelper::getNoteRowScript(false, $this->form, $this->lists['appId']);
?>
<?php
echo FormHelper::getGeneralRowScript();
?>
示例6: foreach
}
}
$html .= '<div class="jt-clearfix">';
$html .= '<span class="jt-left-col-label jt-h3">' . $label . '</span>';
if ($this->lists['technology'] != 'b' and $this->lists['technology'] != 'j') {
$html .= '<span class="jt-detail-col-label jt-h3"> </span>';
}
$html .= '<span class="jt-right-col-label jt-h3">' . JText::_('JT_BORN') . '</span>';
$html .= '<span class="jt-right-col-label jt-h3">' . JText::_('JT_DIED') . '</span>';
$html .= '</div>';
foreach ($partners as $partner) {
// Button for editing (only active with AJAX)
if ($this->lists['technology'] != 'b' && $this->lists['technology'] != 'j') {
if (is_object($this->canDo)) {
$indliving = $this->person->living && $partner->living ? true : false;
$display = FormHelper::checkDisplay('relation', $indliving);
if ($display) {
$html .= '<div class="jt-clearfix"></div>';
$html .= '<div class="jt-edit-2" style="text-align: right;">';
if ($this->canDo->get('core.edit')) {
$html .= '<a href="#" ';
$html .= ' title="' . JText::sprintf('JT_EDITPARTNEREVENTS_DESC', $partner->firstName) . '"';
$html .= ' onclick="jtsetrelation(\'' . $partner->id . '\'); jtsubmitbutton(\'edit\', \'partnerevents\');" >';
$html .= JText::_('JT_EDITPARTNEREVENTS');
$html .= '</a>';
} else {
$html .= '<span class="jt-edit-nolink" title="' . JText::_('JT_NOPERMISSION_DESC') . '" >';
$html .= JText::_('JT_EDITPARTNEREVENTS');
$html .= '</span>';
}
$html .= ' |';