本文整理汇总了PHP中Helpers::trimText方法的典型用法代码示例。如果您正苦于以下问题:PHP Helpers::trimText方法的具体用法?PHP Helpers::trimText怎么用?PHP Helpers::trimText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helpers
的用法示例。
在下文中一共展示了Helpers::trimText方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
$this->beginContent('application.modules_core.activity.views.activityLayout', array('activity' => $activity));
?>
<?php
echo Yii::t('CommentModule.views_activities_CommentCreated', "%displayName% wrote a new comment ", array('%displayName%' => '<strong>' . $user->displayName . '</strong>'));
?>
"<?php
$text = ActivityModule::formatOutput($target->message);
echo Helpers::trimText($text, 100);
?>
".
<?php
$this->endContent();
示例2: foreach
echo $this->createUrl('//dashboard/index');
?>
">All Spaces</a></li>
<?php
foreach ($usersSpaces as $space) {
?>
<li class="<?php
if ($space->guid == $currentSpaceGuid) {
echo "active";
}
?>
"><a href="<?php
echo $this->createUrl('//space/space', array('sguid' => $space->guid));
?>
"><?php
print CHtml::encode(Helpers::trimText($space->name, 35));
?>
</a></li>
<?php
}
?>
</ul>
<br>
<a href="<?php
echo $this->createUrl('//space/create');
?>
" class="btn"><i class="fa fa-plus"></i> New Space</a>
</div>
示例3: foreach
echo $this->createUrl('//dashboard/index');
?>
">All Spaces</a></li>
<?php
foreach ($usersSpaces as $space) {
?>
<li class="<?php
if ($space->guid == $currentSpaceGuid) {
echo "active";
}
?>
"><a href="<?php
echo $this->createUrl('//space/space', array('sguid' => $space->guid));
?>
"><?php
print Helpers::trimText($space->name, 35);
?>
</a></li>
<?php
}
?>
</ul>
<br>
<a href="<?php
echo $this->createUrl('//space/create');
?>
" class="btn"><i class="fa fa-plus"></i> New Space</a>
</div>
示例4: foreach
<ul class="files" style="list-style: none; margin: 0;" id="files-<?php
echo $document->getPrimaryKey();
?>
">
<?php
foreach ($files as $file) {
?>
<li class="mime <?php
echo HHtml::getMimeIconClassByExtension($file->getExtension());
?>
">
<a href="<?php
echo $file->getUrl();
?>
" target="_blank"><?php
echo Helpers::trimText($file->file_name, 40);
?>
<span class="tome"> - <?php
echo Yii::app()->format->formatSize($file->size);
?>
</span></a>
</li>
<?php
}
?>
</ul>
<?php
}
?>
<?php
示例5: foreach
echo $this->createUrl('//dashboard/index');
?>
">All Rooms</a></li>
<?php
foreach ($usersRooms as $room) {
?>
<li class="<?php
if ($room->guid == $currentRoomGuid) {
echo "active";
}
?>
"><a href="<?php
echo $this->createUrl('//rooms/room', array('sguid' => $room->guid));
?>
"><?php
print CHtml::encode(Helpers::trimText($room->name, 35));
?>
</a></li>
<?php
}
?>
</ul>
<br>
<a href="<?php
echo $this->createUrl('//rooms/room/create');
?>
" class="btn"><i class="fa fa-plus"></i> New Room</a>
</div>
示例6:
" width="150" height="150"
class="random-space-image" alt="150x150" data-src="holder.js/150x150" /><br>
</a>
<div class="space-title">
<a href="<?php
echo $space->getUrl();
?>
">
<?php
echo Helpers::trimText($space->name, 25);
?>
</a>
</div>
<div class="space-description">
<?php
echo !empty($space->description) ? Helpers::trimText($space->description, 125) : Yii::t('RandomSpaceModule.base', '<i>No description</i>');
?>
</div>
</div>
<div id="space-widget-members">
<?php
$limit = 39;
$cur = 0;
foreach ($members as $member) {
if ($limit >= $cur) {
?>
<a href="<?php
echo $member->getProfileUrl();
?>
">
<img src="<?php