本文整理匯總了PHP中Images::getAlt方法的典型用法代碼示例。如果您正苦於以下問題:PHP Images::getAlt方法的具體用法?PHP Images::getAlt怎麽用?PHP Images::getAlt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Images
的用法示例。
在下文中一共展示了Images::getAlt方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
<?php
$count = 0;
if ($this->images) {
?>
<ul class="thumbnails">
<?php
foreach ($this->images as $image) {
?>
<li>
<?php
/*$imgTag = CHtml::image(Images::getThumbUrl($image, 640, 400), Images::getAlt($image));
echo CHtml::link($imgTag, Images::getThumbUrl($image, 640, 400),
array(
'title' => Images::getAlt($image),
)
);*/
$imgTag = CHtml::image(Images::getThumbUrl($image, 100, 100), Images::getAlt($image), array());
echo CHtml::link($imgTag, '', array('title' => Images::getAlt($image), 'class' => 'thumbnail', 'id' => 'carousel-selector-' . $count));
$count++;
?>
</li>
<?php
}
?>
</ul>
<?php
}
示例2: foreach
if ($this->images) {
?>
<div class="images-area">
<?php
foreach ($this->images as $image) {
if ($this->withMain && $image['is_main'] || !$this->withMain && !$image['is_main'] || !$image['is_main']) {
?>
<div class="image-item" id="image_<?php
echo $image['id'];
?>
">
<div class="image-drag-area"></div>
<div class="image-link-item">
<?php
$imgTag = CHtml::image(Images::getThumbUrl($image, 150, 100), Images::getAlt($image));
echo CHtml::link($imgTag, Images::getFullSizeUrl($image), array('class' => 'fancy', 'rel' => 'gallery', 'title' => Images::getAlt($image)));
?>
<br/>
<span class="setAsMain" link-id="<?php
echo $image['id'];
?>
">
<?php
if ($image['is_main']) {
echo tc('Main photo');
} else {
echo '<a class="setAsMainLink" href="#">' . tc('Set as main photo') . '</a>';
}
?>
</span><br/>
<a class="deleteImageLink" link-id="<?php
示例3: foreach
<?php
if ($this->images) {
?>
<div class="images-area">
<?php
foreach ($this->images as $image) {
if ($this->withMain && $image['is_main'] || !$this->withMain && !$image['is_main'] || !$image['is_main']) {
?>
<div class="image-area-item">
<?php
$imgTag = CHtml::image(Images::getThumbUrl($image, 150, 100), Images::getAlt($image));
echo CHtml::link($imgTag, Images::getFullSizeUrl($image), array('rel' => 'prettyPhoto[img-gallery]', 'title' => Images::getAlt($image)));
?>
</div>
<?php
}
}
?>
<div class="clear"></div>
</div>
<?php
}