當前位置: 首頁>>代碼示例>>PHP>>正文


PHP It::createTextPreview方法代碼示例

本文整理匯總了PHP中It::createTextPreview方法的典型用法代碼示例。如果您正苦於以下問題:PHP It::createTextPreview方法的具體用法?PHP It::createTextPreview怎麽用?PHP It::createTextPreview使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在It的用法示例。


在下文中一共展示了It::createTextPreview方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: test_CreateTextPreview_CustomReplacement

 public function test_CreateTextPreview_CustomReplacement()
 {
     $s = 'Test string';
     $limit = 10;
     $replacement = '>>>';
     $result = It::createTextPreview($s, $limit, $replacement);
     $expected = 'Test st>>>';
     $this->assertEquals($expected, $result);
 }
開發者ID:anton-itscript,項目名稱:WM-Web,代碼行數:9,代碼來源:ItTest.php

示例2: foreach

        ?>

                <?php 
        foreach ($render_data['handler_sensor']['sea_level']['SeaLevelAWS'] as $key => $value) {
            ?>
                    <table style="<?php 
            echo $key ? 'display:none;' : '';
            ?>
">
                        <tr>
                            <td>&nbsp;</td>
                            <td colspan="6" style="text-align: center;" title="<?php 
            echo $value['sensor_display_name'] . ' - ' . $value['sensor_id_code'];
            ?>
 "><?php 
            echo It::createTextPreview($value['sensor_display_name'], 45, '...');
            ?>
</td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <th style="text-align: center;"><?php 
            echo It::t('home_aws', 'single__block_sea_mean');
            ?>
</th>
                            <th>&nbsp;</th>
                            <th style="text-align: center;"><?php 
            echo It::t('home_aws', 'single__block_sea_sigma');
            ?>
</th>
                            <th>&nbsp;</th>
開發者ID:anton-itscript,項目名稱:WM-Web,代碼行數:31,代碼來源:aws_single_bottom.php

示例3: isset

        $visibillityData = $visibilityClass === 'VisibilityAWS' ? $renderDataRecord : $renderDataRecord['visibility_1'];
        $hasFilterErrors = isset($visibillityData['last_filter_errors']);
        ?>
		<table style="<?php 
        echo $key ? 'display:none;' : '';
        ?>
">
			<tr>
				<td>&nbsp;</td>

				<td colspan="2" title="<?php 
        echo $renderDataRecord['sensor_display_name'] . ' - ' . $renderDataRecord['sensor_id_code'];
        ?>
 ">
					<?php 
        echo It::createTextPreview($renderDataRecord['sensor_display_name'], 15, '...');
        ?>
				</td>
			</tr>    
			<tr>
				<th><?php 
        echo It::t('home_aws', 'single__block_vis_last');
        ?>
</th>

				<td <?php 
        if ($hasFilterErrors) {
            ?>
 title="<?php 
            echo implode("; ", $visibillityData['last_filter_errors']);
            ?>
開發者ID:anton-itscript,項目名稱:WM-Web,代碼行數:31,代碼來源:aws_visibility.php

示例4: fmod

        ?>

        <div class="data_box <?php 
        echo $key && fmod($key + 1, 4) == 0 ? '' : 'margin';
        ?>
">

            <div class="header">
                <a href="<?php 
        echo $this->createUrl('site/rgtable', array('station_id' => $station_data['station_id']));
        ?>
" title="<?php 
        echo $station_data['display_name'];
        ?>
"><?php 
        echo It::createTextPreview($station_data['display_name'], 23, '...');
        ?>
</a><br/>
                <?php 
        echo $station_data['station_id_code'];
        ?>
<br/>
                <?php 
        echo It::t('home_rg', 'panel__rain_guage_station');
        ?>
                 
            </div>

            <div class="content">
                <table>
                <tr>
開發者ID:anton-itscript,項目名稱:WM-Web,代碼行數:31,代碼來源:index.php

示例5: foreach

                        <td>Mean</td>
                        <td>&nbsp;</td>
                        <td>Sigma</td> 
                        <td>&nbsp;</td>
                        <td>Wave</td>
                        <td>&nbsp;</td>                    
                    </tr>    
                    <?php 
                foreach ($station_data->displaySensorsValues['sea_level_data'] as $k1 => $v1) {
                    ?>
                        <tr>
                            <th title="<?php 
                    echo $v1['sensor_id_code'];
                    ?>
"><?php 
                    echo It::createTextPreview($v1['sensor_display_name'], 20, '...');
                    ?>
</th>

                            <td <?php 
                    if (isset($v1['sea_level_mean']['last_filter_errors'])) {
                        ?>
 title="<?php 
                        echo implode("; ", $v1['sea_level_mean']['last_filter_errors']);
                        ?>
" <?php 
                    }
                    ?>
 >
                                <?php 
                    if ($v1['sea_level_mean'] && in_array('last', array_keys($v1['sea_level_mean']))) {
開發者ID:anton-itscript,項目名稱:WM-Web,代碼行數:31,代碼來源:aws_panel_old.php


注:本文中的It::createTextPreview方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。