imagePolaroid() public static method

Generates an image tag within polaroid frame.
Deprecation: See {@link imageThumbnail()}
public static imagePolaroid ( string $src, string $alt = '', array $htmlOptions = [] ) : string
$src string the image URL.
$alt string the alternative text display.
$htmlOptions array additional HTML attributes.
return string the generated image tag.
Exemplo n.º 1
0
	<div class="bs-docs-example">
		<div class="row-fluid" style="text-align: center; width: 450px;">
			<div class="span4">
				<?php 
echo TbHtml::imageRounded('holder.js/140x140');
?>
			</div>
			<div class="span4">
				<?php 
echo TbHtml::imageCircle('holder.js/140x140');
?>
			</div>
			<div class="span4">
				<?php 
echo TbHtml::imagePolaroid('holder.js/140x140');
?>
			</div>
		</div>
	</div>

    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::imageRounded('...'); ?>
&lt;?php echo TbHtml::imageCircle('...'); ?>
&lt;?php echo TbHtml::imagePolaroid('...'); ?></pre>

</section>

<!-- Nav, Tabs, & Pills
	================================================== -->
<section id="navs">
            <li>
                <a href="<?php 
    echo Yii::app()->createUrl("saleItem/indexpara", array("item_id" => $product->id));
    ?>
" title="<?php 
    echo $product->name;
    ?>
" data-rel="colorbox" class="list-product">
                    <span>
                    <?php 
    if ($item_image) {
        $uri = 'data:image/png;base64,' . base64_encode($item_image->thumbnail);
        echo CHtml::image($uri, 'Produt Image');
    } else {
        //echo CHtml::image(Yii::app()->baseUrl . '/images/image.png','Product Image');
        echo TbHtml::imagePolaroid('holder.js/125x117/acename/text:' . $product->name);
    }
    ?>
                    <span>
                    <!--<img alt="120x100" src=<?php 
    //echo Yii::app()->baseUrl . '/images/image.png';
    ?>
 width="120px" height="100px" />-->
                    <div class="tags">
                            <span class="label label-info"><?php 
    echo $product->name;
    ?>
</span>
                            <span class="label label-success arrowed-in"><?php 
    echo number_format($product->unit_price, Yii::app()->shoppingCart->getDecimalPlace());
    ?>
Exemplo n.º 3
0
 public function testImagePolaroid()
 {
     $I = $this->codeGuy;
     $html = TbHtml::imagePolaroid('image.png', 'Alternative text', array('class' => 'image'));
     $img = $I->createNode($html, 'img.img-polaroid');
     $I->seeNodeCssClass($img, 'image');
     $I->seeNodeAttributes($img, array('src' => 'image.png', 'alt' => 'Alternative text'));
 }
            <?php 
foreach ($products as $product) {
    ?>
            <?php 
    $item_image = ItemImage::model()->find('item_id=:itemId', array(':itemId' => $product->id));
    ?>
            <li>
                <a href="<?php 
    echo Yii::app()->createUrl("saleItem/indexpara", array("item_id" => $product->id));
    ?>
" title="<?php 
    echo $product->name;
    ?>
" data-rel="colorbox" class="list-product">
                    <?php 
    echo TbHtml::imagePolaroid('holder.js/110x100/acename/text:');
    /*
    if ($item_image) { 
        $uri = 'data:image/png;base64,'.base64_encode($item_image->thumbnail);
        echo CHtml::image($uri,'Produt Image');
    }else {
        //echo CHtml::image(Yii::app()->baseUrl . '/images/image.png','Product Image');
        echo TbHtml::imagePolaroid('holder.js/105x117/acename/text:');
    }
     * 
    */
    ?>
                    <!--<img alt="120x100" src=<?php 
    //echo Yii::app()->baseUrl . '/images/image.png';
    ?>
 width="120px" height="100px" />-->
Exemplo n.º 5
0
Arquivo: form.php Projeto: cicb/tpc
?>

						<?php 
echo $form->textField($model, 'EventoImaBol', array('append' => TbHtml::button('Seleccionar imagen', array('class' => 'btn btn-success', 'id' => 'btn-subir-imabol')), 'placeholder' => 'Nombre de la imagen en Boleto'));
?>

				</div>


				<div class='span4 white-box box'>
				<h3><?php 
echo TbHtml::i('', array('class' => 'fa fa-picture-o'));
?>
 Imagen para PV</h3>
					<?php 
echo TbHtml::imagePolaroid(strlen($model->EventoImaMin) > 3 ? "../imagesbd/" . $model->EventoImaMin : 'holder.js/130x130', '', array('id' => 'img-imamin'));
?>
					<br /><br />
					<?php 
echo TbHtml::fileField('imamin', '', array('span' => 2, 'maxlength' => 200, 'class' => 'hidden'));
?>
					<?php 
echo $form->textField($model, 'EventoImaMin', array('append' => TbHtml::button('Seleccionar imagen', array('class' => 'btn btn-success', 'id' => 'btn-subir-imamin')), 'placeholder' => 'Nombre de la imagen miniatura'));
?>
		
				</div>
                <?php 
if ($model->scenario == 'update' and !empty($funciones)) {
    ?>
                <style>
	            .modal-body {