本文整理匯總了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 .= ' |';