本文整理汇总了PHP中AkrecipesFrontendHelper::canEdit方法的典型用法代码示例。如果您正苦于以下问题:PHP AkrecipesFrontendHelper::canEdit方法的具体用法?PHP AkrecipesFrontendHelper::canEdit怎么用?PHP AkrecipesFrontendHelper::canEdit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AkrecipesFrontendHelper
的用法示例。
在下文中一共展示了AkrecipesFrontendHelper::canEdit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
?>
-->
<div class="row"><!-- begin row -->
<?php
}
?>
<?php
// $image = $item->image ;
// if (strpos($image, '/') === 0 ) {
// $image = substr($image, 1);
// }
$image = AkrecipesFrontendHelper::resizeImageToCache($item->image, 'Medium');
$recipe_url = JRoute::_(AkrecipesHelperRoute::getRecipeRoute((int) $item->id, $item->catid));
$author_url = JRoute::_(AkrecipesHelperRoute::getAuthorRoute((int) $item->created_by));
$canEdit = AkrecipesFrontendHelper::canEdit($item);
$unpublished = AkrecipesFrontendHelper::getRecipeUnpublishedText($item);
?>
<div class="blogRecipe col-md-<?php
echo $colspan;
?>
">
<div class="thumbnail <?php
echo $unpublished ? ' system-unpublished ' : '';
?>
">
<a href="<?php
echo $recipe_url;
?>
">
示例2: substr
require_once JPATH_COMPONENT_SITE . '/helpers/akrecipes.php';
require_once JPATH_COMPONENT_SITE . '/helpers/route.php';
$recipe = $this->recipe;
?>
<!-- get recipe image -->
<?php
$image = $recipe->image;
if (strpos($image, '/') === 0) {
$image = substr($image, 1);
}
$recipe_url = AkrecipesHelperRoute::getRecipeRoute($recipe->id, $recipe->catid);
$published = $recipe->state;
$unpublished = AkrecipesFrontendHelper::getRecipeUnpublishedText($recipe);
$canEdit = AkrecipesFrontendHelper::canEdit($recipe);
?>
<div class="userRecipe col-md-<?php
echo $this->colspan;
?>
col-xs-12">
<div class="thumbnail <?php
echo $unpublished ? ' system-unpublished ' : '';
?>
">
<a href="<?php
echo $recipe_url;
?>
">
<img src="<?php