当前位置: 首页>>代码示例>>PHP>>正文


PHP Helpers::trimText方法代码示例

本文整理汇总了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();
开发者ID:ahdail,项目名称:humhub,代码行数:16,代码来源:CommentCreated.php

示例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>
开发者ID:alefernie,项目名称:intranet,代码行数:30,代码来源:yourSpacesMenu.php

示例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>
开发者ID:ahdail,项目名称:humhub,代码行数:30,代码来源:yourSpacesMenu.php

示例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 
开发者ID:nilBora,项目名称:MVC_documents_Yii,代码行数:31,代码来源:entry.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>
开发者ID:verdin12345,项目名称:humhub-modules-rooms,代码行数:30,代码来源:yourRoomsMenu.php

示例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 
开发者ID:rajeshspurohit,项目名称:humhub-modules-random-space,代码行数:31,代码来源:RandomSpacePanel.php


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