當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。