本文整理匯總了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);
}
示例2: foreach
?>
<?php
foreach ($render_data['handler_sensor']['sea_level']['SeaLevelAWS'] as $key => $value) {
?>
<table style="<?php
echo $key ? 'display:none;' : '';
?>
">
<tr>
<td> </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> </td>
<th style="text-align: center;"><?php
echo It::t('home_aws', 'single__block_sea_mean');
?>
</th>
<th> </th>
<th style="text-align: center;"><?php
echo It::t('home_aws', 'single__block_sea_sigma');
?>
</th>
<th> </th>
示例3: isset
$visibillityData = $visibilityClass === 'VisibilityAWS' ? $renderDataRecord : $renderDataRecord['visibility_1'];
$hasFilterErrors = isset($visibillityData['last_filter_errors']);
?>
<table style="<?php
echo $key ? 'display:none;' : '';
?>
">
<tr>
<td> </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']);
?>
示例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>
示例5: foreach
<td>Mean</td>
<td> </td>
<td>Sigma</td>
<td> </td>
<td>Wave</td>
<td> </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']))) {