本文整理汇总了PHP中link_to_if函数的典型用法代码示例。如果您正苦于以下问题:PHP link_to_if函数的具体用法?PHP link_to_if怎么用?PHP link_to_if使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了link_to_if函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tab_tag
function tab_tag($tab_name, $active_link, $active_tab, $url, $tab_class, $commCount = 0, $forum_link = false)
{
$tab_title = __($tab_name . '_tab_help');
$tab_text = __(ucfirst($tab_name));
if ($commCount) {
$tab_text = '<span class="reduced">' . $commCount . '</span>' . '<span>' . $tab_text . ' (' . $commCount . ')' . '</span>';
} else {
$tab_text = '<span>' . $tab_text . '</span>';
}
if ($forum_link) {
if ($active_link) {
use_helper('Forum');
$link = f_link_to($tab_text, $url, array('class' => $tab_class, 'title' => $tab_title));
} else {
$link = '<div class="' . $tab_class . '" title="' . $tab_title . '">' . $tab_text . '</div>';
}
} else {
$options_array = array('class' => $tab_class, 'title' => $tab_title);
if (!$active_link) {
$options_array['tag'] = 'div';
}
$link = link_to_if($active_link, $tab_text, $url, $options_array);
}
return '<li' . setActiveIf($tab_name, $active_tab) . '>' . $link . '</li>';
}
示例2: foreach
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="pager">
Requester per page:
<?php
foreach ($max_array as $i => $v) {
if ($i) {
echo ' | ';
}
echo link_to_if($max != $v, $v, '@default_index?module=requester&max=' . $v);
}
?>
<div>
<form action="<?php
echo url_for('@default_index?module=requester');
?>
">
<?php
if (isset($mission_for)) {
$url_add = '&mission_for=' . $mission_for->getId();
?>
<input type="hidden" name="mission_for" value="<?php
echo $mission_for->getId();
?>
"/>
示例3: op_link_to_member
<strong class="name"><?php
echo op_link_to_member($activity->getMember());
?>
</strong>
<span class="bodyText"><?php
echo op_activity_body_filter($activity);
?>
</span>
</span>
<span class="info">
<span class="time"><?php
echo $time = op_format_activity_time(strtotime($activity->getCreatedAt()));
if ($activity->getSource()) {
?>
from <?php
echo link_to_if($activity->getSourceUri(), $activity->getSource(), $activity->getSourceUri());
}
?>
</span>
<?php
if ($activity->getPublicFlag() != ActivityDataTable::PUBLIC_FLAG_SNS) {
?>
<span class="public_flag"><?php
echo __('Public flag');
?>
: <?php
echo $activity->getPublicFlagCaption();
?>
</span>
<?php
}
示例4: foreach
</ul>
</td>
</tr>
</tbody>
<?php
}
?>
</table>
<div class="pager">
Mission per page:
<?php
foreach ($max_array as $i => $v) {
if ($i) {
echo ' | ';
}
echo link_to_if($max != $v, $v, '@default_index?module=mission&max=' . $v);
}
?>
<div>
<form action="<?php
echo url_for('@default_index?module=mission');
?>
">
<?php
echo link_to('Previous', '@default_index?module=mission&page=' . $pager->getPreviousPage(), array('class' => 'btn-pager-prev'));
?>
<input type="text" name="page" class="active-page" value="<?php
echo $pager->getPage();
?>
"/>
<strong>of <?php
示例5: link_to_if
">
<?php
echo link_to_if($pDeal->canReset_to_share(), __('Schritt 2: Deal'), 'deals/step_share?did=' . $pDeal->getId());
?>
</li>
<li class="<?php
echo $lAction == 'step_coupon' ? 'active' : "";
?>
">
<?php
echo link_to_if($pDeal->canReset_to_coupon(), __('Schritt 3: Gutschein'), 'deals/step_coupon?did=' . $pDeal->getId());
?>
</li>
<li class="<?php
echo $lAction == 'step_billing' ? 'active' : "";
?>
">
<?php
echo link_to_if($pDeal->canReset_to_billing(), __('Schritt 4: Rechnung'), 'deals/step_billing?did=' . $pDeal->getId());
?>
</li>
<li class="<?php
echo $lAction == 'step_verify' ? 'active' : "";
?>
">
<span><?php
echo __('Schritt 5: Prüfen');
?>
</span>
</li>
</ul>
示例6: link_to
?>
<td><?php
$value = $documento->__toString();
echo link_to($value ? $value : $undefined, 'documentos/edit?id_documento=' . $documento->getPrimaryKey());
?>
</td>
<td><?php
$proyecto = $documento->getProyecto();
$value = $proyecto ? $proyecto->__toString() : "";
echo link_to_if($proyecto instanceof Proyecto ? 1 : 0, $value ? $value : $undefined, 'proyectos/edit?id_proyecto=' . $documento->getIdProyecto());
?>
</td>
<td><?php
$fase = $documento->getFase();
$value = $fase ? $fase->__toString() : "";
echo link_to_if($fase instanceof Fase ? 1 : 0, $value ? $value : $undefined, 'fases/edit?id_fase=' . $documento->getIdFase());
?>
</td>
<td><?php
echo $documento->getIdEntregable() ? __('Entregable') : __('Reunión');
?>
</td>
<td><?php
$value = "";
if ($documento->getIdEntregable()) {
$entregable = $documento->getEntregable();
if ($entregable instanceof Entregable) {
$texto = $entregable->__toString();
$value = link_to($texto ? $texto : "—", "asignaciones/edit_entregable?id_entregable=" . $entregable->getPrimaryKey());
}
} else {
示例7: foreach
<?php
foreach ($functions as $item) {
?>
<?php
echo render_show(__('Related function'), link_to(render_title($item), array($item, 'module' => 'function')));
?>
<?php
}
?>
</div>
<div class="section" id="controlArea">
<?php
echo link_to_if(QubitAcl::check($resource, 'update'), '<h2>' . __('Control area') . '</h2>', array($resource, 'module' => 'actor', 'action' => 'edit'), array('anchor' => 'controlArea', 'title' => __('Edit control area')));
?>
<?php
echo render_show(__('Description identifier'), render_value($resource->descriptionIdentifier));
?>
<?php
echo render_show(__('Institution identifier'), render_value($resource->getInstitutionResponsibleIdentifier(array('cultureFallback' => true))));
?>
<?php
echo render_show(__('Rules and/or conventions used'), render_value($resource->getRules(array('cultureFallback' => true))));
?>
<?php
示例8: foreach
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="pager">
Agency per page:
<?php
foreach ($max_array as $i => $v) {
if ($i) {
echo ' | ';
}
echo link_to_if($max != $v, $v, '@default_index?module=agency&max=' . $v);
}
?>
<div>
<form action="<?php
echo url_for('@default_index?module=agency');
?>
">
<?php
echo link_to('Previous', '@default_index?module=agency&page=' . $pager->getPreviousPage(), array('class' => 'btn-pager-prev'));
?>
<input type="text" name="page" class="active-page" value="<?php
echo $pager->getPage();
?>
"/>
<strong>of <?php
示例9: render_show
?>
<?php
echo render_show(__('Reproduction services'), render_value($resource->getReproductionServices(array('cultureFallback' => true))));
?>
<?php
echo render_show(__('Public areas'), render_value($resource->getPublicFacilities(array('cultureFallback' => true))));
?>
</div>
<div class="section" id="controlArea">
<?php
echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'repository'), '<h2>' . __('Control area') . '</h2>', array($resource, 'module' => 'repository', 'action' => 'edit'), array('anchor' => 'controlArea', 'title' => __('Edit control area')));
?>
<?php
echo render_show(__('Description identifier'), render_value($resource->descIdentifier));
?>
<?php
echo render_show(__('Institution identifier'), render_value($resource->getDescInstitutionIdentifier(array('cultureFallback' => true))));
?>
<?php
echo render_show(__('Rules and/or conventions used'), render_value($resource->getDescRules(array('cultureFallback' => true))));
?>
<?php
示例10: link_to
echo link_to('Remove', 'pending_member/delete?id=' . $application_temp->getId(), array('class' => 'action-remove', 'method' => 'delete', 'confirm' => 'Are you sure?'));
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="pager">Application per page: <?php
foreach ($max_array as $i => $v) {
if ($i) {
echo ' | ';
}
echo link_to_if($max != $v, $v, 'pending_member/search?max=' . $v);
}
?>
<div>
<form action="<?php
echo url_for('pending_member/search');
?>
"><?php
echo link_to('Previous', 'pending_member/search?page=' . $pager->getPreviousPage(), array('class' => 'btn-pager-prev'));
?>
<input type="text" name="page" class="active-page"
value="<?php
echo $pager->getPage();
?>
" /> <strong>of <?php
echo link_to($pager->getLastPage(), 'pending_member/search?page=' . $pager->getLastPage());
示例11: foreach
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="pager">
People per page:
<?php
foreach ($max_array as $i => $v) {
if ($i) {
echo ' | ';
}
echo link_to_if($max != $v, $v, '@passenger_find?module=passenger&max=' . $v . $linkdata2);
}
?>
<div>
<form action="<?php
echo url_for('@passenger_find?module=passenger' . $linkdata2);
?>
">
<?php
echo link_to('Previous', '@passenger_find?module=passenger&page=' . $pager->getPreviousPage() . $linkdata2, array('class' => 'btn-pager-prev'));
?>
<input type="text" name="page" class="active-page" value="<?php
echo $pager->getPage();
?>
"/>
<strong>of <?php
示例12: link_to
echo $paginationId;
?>
">
<?php
if ($pager->haveToPaginate()) {
?>
<?php
if ($pager->getPage() !== $pager->getFirstPage()) {
echo link_to('« First', 'sf_image_pool_chooser', array('page' => $pager->getFirstPage()) + $extra);
echo ' | ';
echo link_to('‹ Previous', 'sf_image_pool_chooser', array('page' => $pager->getPreviousPage()) + $extra);
echo ' | ';
}
foreach ($pager->getLinks(10) as $link) {
// Link if it's not the currrent page :)
echo link_to_if($link !== $pager->getPage(), $link, 'sf_image_pool_chooser', array('page' => $link) + $extra);
echo ' | ';
}
if ($pager->getNextPage() !== $pager->getLastPage()) {
echo link_to('Next ›', 'sf_image_pool_chooser', array('page' => $pager->getNextPage()) + $extra);
echo ' | ';
echo link_to('Last »', 'sf_image_pool_chooser', array('page' => $pager->getLastPage()) + $extra);
}
?>
<br />
<?php
}
?>
Displaying <?php
示例13: link_to_if
<td><?php
$parametros = "?id_documento=" . $historico_documento->getIdDocumento();
$parametros .= '&version=' . $historico_documento->getVersion();
$documento = $historico_documento->getDocumento();
$value = $documento ? $documento->getNombre() : "";
echo link_to_if($documento instanceof Documento, $value ? $value : "—", 'historico_documentos/show' . $parametros);
?>
</td>
<td align="right"><?php
echo link_to($historico_documento->getVersion() ? $historico_documento->getVersion() : __('-'), 'historico_documentos/show' . $parametros);
?>
</td>
<td><?php
echo $historico_documento->getNombreFich();
?>
</td>
<td align="right"><?php
echo $historico_documento->getTamanoFormateado();
?>
</td>
<td><?php
echo $historico_documento->getFecha() ? format_date($historico_documento->getFecha(), "g") : '';
?>
</td>
<td><?php
$usuario = $historico_documento->getUsuario();
$nombre = $usuario ? $usuario->__toString() : "- " . __('Sin definir') . " -";
echo $nombre ? $nombre : "—";
?>
</td>
示例14: foreach
?>
</tbody>
</table>
<div class="pager">
Members per page:
<?php
foreach ($max_array as $i => $v) {
if ($i) {
echo ' | ';
}
$url = '@default_index?module=member&max=' . $v;
if ($master_for) {
$url .= '&master_for=' . $master_for->getId();
}
echo link_to_if($max != $v, $v, $url);
}
?>
<div>
<form action="<?php
echo url_for('@default_index?module=member');
?>
">
<?php
if ($master_for) {
$url_add = '&master_for=' . $master_for->getId();
?>
<input type="hidden" name="master_for" value="<?php
echo $master_for->getId();
?>
"/>
示例15: foreach
</ul>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="pager">
People per page:
<?php
foreach ($max_array as $i => $v) {
if ($i) {
echo ' | ';
}
echo link_to_if($max != $v, $v, 'person/subscribe?id=' . $email_list->getId() . '&max=' . $v);
}
?>
<div>
<form action="<?php
echo url_for('person/subscribe?id=' . $email_list->getId());
?>
">
<?php
echo link_to('Previous', 'person/subscribe?id=' . $email_list->getId() . '&page=' . $pager->getPreviousPage(), array('class' => 'btn-pager-prev'));
?>
<input type="text" name="page" class="active-page" value="<?php
echo $pager->getPage();
?>
"/>
<strong>of <?php