• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP link_to_if函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中link_to_if函数的典型用法代码示例。如果您正苦于以下问题:PHP link_to_if函数的具体用法?PHP link_to_if怎么用?PHP link_to_if使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了link_to_if函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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>';
}
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:25,代码来源:WikiTabsHelper.php


示例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();
        ?>
"/>
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:indexSuccess.php


示例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 
}
开发者ID:kawahara,项目名称:OpenPNE3,代码行数:31,代码来源:_activityRecord.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 
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:indexSuccess.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>
开发者ID:42medien,项目名称:spreadly,代码行数:31,代码来源:_breadcrumb.php


示例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 : "&mdash;", "asignaciones/edit_entregable?id_entregable=" . $entregable->getPrimaryKey());
    }
} else {
开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:31,代码来源:_list_td_tabular.php


示例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 
开发者ID:nurfiantara,项目名称:ehri-ica-atom,代码行数:31,代码来源:indexSuccess.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 
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:indexSuccess.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 
开发者ID:nurfiantara,项目名称:ehri-ica-atom,代码行数:31,代码来源:indexSuccess.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());
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:searchSuccess.php


示例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 
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:findSuccess.php


示例12: link_to

echo $paginationId;
?>
">
  <?php 
if ($pager->haveToPaginate()) {
    ?>
    <?php 
    if ($pager->getPage() !== $pager->getFirstPage()) {
        echo link_to('&laquo; First', 'sf_image_pool_chooser', array('page' => $pager->getFirstPage()) + $extra);
        echo ' | ';
        echo link_to('&#139; 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 &#155;', 'sf_image_pool_chooser', array('page' => $pager->getNextPage()) + $extra);
        echo ' | ';
        echo link_to('Last &raquo;', 'sf_image_pool_chooser', array('page' => $pager->getLastPage()) + $extra);
    }
    ?>
    
    <br />
  <?php 
}
?>
  
  Displaying <?php 
开发者ID:nixilla,项目名称:sfImagePoolPlugin,代码行数:31,代码来源:_chooser_pagination.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 : "&mdash;", '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 : "&mdash;";
?>
</td>
开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:30,代码来源:_list_documentos_td_tabular.php


示例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();
        ?>
"/>
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:indexSuccess.php


示例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 
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:subscribeSuccess.php


示例16: rt_nice_boolean

    ?>
"><?php 
    echo $rt_shop_category->getTitle();
    ?>
</a></td>
      <td class="rt-admin-publish-toggle">
        <?php 
    echo rt_nice_boolean($rt_shop_category->getPublished());
    ?>
        <div style="display:none;"><?php 
    echo $rt_shop_category->getId();
    ?>
</div>
      </td>
      <td><?php 
    echo link_to_if($rt_shop_category->version > 1, $rt_shop_category->version, 'rtShopCategoryAdmin/versions?id=' . $rt_shop_category->getId());
    ?>
</td>
      <td><?php 
    echo $rt_shop_category->getCreatedAt();
    ?>
</td>
      <td>
        <ul class="rt-admin-tools">
          <li><?php 
    echo rt_button_show(url_for('rtShopCategoryAdmin/show?id=' . $rt_shop_category->getId()));
    ?>
</li>
          <li><?php 
    echo rt_button_edit(url_for('rtShopCategoryAdmin/edit?id=' . $rt_shop_category->getId()));
    ?>
开发者ID:pierswarmers,项目名称:rtShopPlugin,代码行数:31,代码来源:indexSuccess.php


示例17: foreach

 <?php 
        echo $i == '0' ? 'first-line' : '';
        ?>
">
        <div class="<?php 
        echo $day == $today ? 'today' : ($day == $page_date ? ' current' : ' default');
        ?>
">
          <?php 
        if (!empty($events) && $month[1] == $page_month[1]) {
            ?>
            <?php 
            foreach ($events as $event) {
                ?>
              <p><?php 
                echo link_to_if(isset($event['url']), date('d', strtotime($day)), $event['url'], array('title' => $event['title'], 'class' => 'link'));
                ?>
</p>
            <?php 
            }
            ?>
          <?php 
        } elseif ($month[1] == $page_month[1]) {
            ?>
            <p><?php 
            echo date('d', strtotime($day));
            ?>
</p>
          <?php 
        }
        ?>
开发者ID:noreiller,项目名称:sfPlopPlugin,代码行数:31,代码来源:_Calendar.php


示例18: link_to_unless

/**
 * If the condition passed as first argument is false,
 * creates a <a> link tag of the given name using a routed URL
 * based on the module/action passed as argument and the routing configuration.
 * If the condition is true, the given name is returned between <span> tags
 *
 * <b>Options:</b>
 * - 'tag' - the HTML tag that must enclose the name if the condition is true, defaults to <span>
 * - 'absolute' - if set to true, the helper outputs an absolute URL
 * - 'query_string' - to append a query string (starting by ?) to the routed url
 * - 'anchor' - to append an anchor (starting by #) to the routed url
 * - 'confirm' - displays a javascript confirmation alert when the link is clicked
 * - 'popup' - if set to true, the link opens a new browser window
 * - 'post' - if set to true, the link submits a POST request instead of GET (caution: do not use inside a form)
 *
 * <b>Examples:</b>
 * <code>
 *  echo link_to_unless($user->isAdministrator(), 'Delete this page', 'my_module/my_action');
 *    => <span>Delete this page</span>
 *  echo link_to_unless(!$user->isAdministrator(), 'Delete this page', 'my_module/my_action');
 *    => <a href="/path/to/my/action">Delete this page</a>
 * </code>
 *
 * @param  bool   $condition     condition
 * @param  string $name          name of the link, i.e. string to appear between the <a> tags
 * @param  string $internal_uri  'module/action' or '@rule' of the action
 * @param  array  $options       additional HTML compliant <a> tag parameters
 * @return string XHTML compliant <a href> tag or name
 * @see    link_to
 */
function link_to_unless($condition, $name = '', $internal_uri = '', $options = array())
{
    return link_to_if(!$condition, $name, $internal_uri, $options);
}
开发者ID:nvidela,项目名称:kimkelen,代码行数:34,代码来源:UrlHelper.php


示例19: foreach

        </td>
  </tr>
</tbody>
<?php 
    }
    ?>
</table>
<span><a href="/mission_photo">Back</a></span>
<div class="pager">
  Mission per page:
  <?php 
    foreach ($max_array as $i => $v) {
        if ($i) {
            echo ' | ';
        }
        echo link_to_if($max != $v, $v, 'mission_photo/show?max=' . $v . '&id=' . $mission_photo->getId());
    }
    ?>
  <div>
    <form action="<?php 
    echo url_for('mission_photo/show');
    ?>
">
      <input type="hidden" value="<?php 
    echo $mission_photo->getId();
    ?>
" name="id">
      <?php 
    echo link_to('Previous', 'mission_photo/show?page=' . $pager->getPreviousPage() . '&id=' . $mission_photo->getId(), array('class' => 'btn-pager-prev'));
    ?>
      <input type="text" name="page" class="active-page" value="<?php 
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:showSuccess.php


示例20: foreach

    </td>
  </tr>
  <?php 
        }
        ?>
</tbody>
</table>

<div class="pager">
  Sent email per page:
  <?php 
        foreach ($max_array as $i => $v) {
            if ($i) {
                echo ' | ';
            }
            echo link_to_if($max != $v, $v, 'email/listEditBulkSentEmail?max=' . $v);
        }
        ?>
  <div>
    <form action="<?php 
        echo url_for('email/listEditBulkSentEmail');
        ?>
">
      <?php 
        echo link_to('Previous', 'email/listEditBulkSentEmail?page=' . $pager->getPreviousPage(), array('class' => 'btn-pager-prev'));
        ?>
      <input type="text" name="page" class="active-page" value="<?php 
        echo $pager->getPage();
        ?>
"/>
      <strong>of <?php 
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:listEditBulkSentEmailSuccess.php



注:本文中的link_to_if函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP link_to_popup_window函数代码示例发布时间:2022-05-15
下一篇:
PHP link_to_home_page函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap