image() public static méthode

Generates an image tag.
public static image ( string $src, string $alt = '', array $htmlOptions = [] ) : string
$src string the image URL.
$alt string the alternative text display.
$htmlOptions array additional HTML attributes.
Résultat string the generated image tag.
   padding: 0 !important;
   margin: 0 !important;
   padding-bottom: 0;
}
</style>
<div class="container"> 
    <div class="row">
        <div class="col-xs-5">
            <div class="panel panel-default">
                <div class="panel-body">
                    <p>
                        <?php 
if (Yii::app()->settings->get('receipt', 'printcompanyLogo') == '1') {
    ?>
                            <?php 
    echo TbHtml::image(Yii::app()->baseUrl . '/images/logo.png', 'Company\'s logo', array('width' => '100'));
    ?>
 <br>
                        <?php 
}
?>
                    </p>
                </div>
            </div>
        </div>
        <div class="col-xs-6 col-xs-offset-1 text-right">
            <div class="panel panel-default">
                    <p>
                        <?php 
if (Yii::app()->settings->get('receipt', 'printcompanyName') == '1') {
    ?>
<div class="span8" style="float: none;margin-left: auto; margin-right: auto;">
    <?php 
if (isset($error_message)) {
    echo '<h2 style="text-align: center;">' . $error_message . '</h1>';
} else {
    ?>
        <div id="receipt_header" style="width:200px; margin:0 auto;">
            <div id="copmany_logo" align="center"><?php 
    echo TbHtml::image(Yii::app()->baseUrl . '/images/memoire-coffee.png', 'Company\'s logo', array('width' => '110'));
    ?>
</div>
            <div id="company_name" align="center"><?php 
    echo TbHtml::b(Yii::app()->settings->get('site', 'companyName'));
    ?>
</b></div>
            <div id="company_address" align="center"><?php 
    echo TbHtml::b(Yii::app()->settings->get('site', 'companyAddress'));
    ?>
</div>
            <div id="company_phone" align="center"><b><?php 
    echo TbHtml::b(Yii::app()->settings->get('site', 'companyPhone'));
    ?>
</b></div>
            <div id="sale_receipt" align="center"><?php 
    echo TbHtml::b('Sales Receipt');
    ?>
</div>
            <div id="sale_time" align="center"><?php 
    echo TbHtml::b($transaction_time);
    ?>
</div>
Exemple #3
0
<?php

$this->widget('bootstrap.widgets.TbAlert');
?>
 
<?php 
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array(array('name' => 'name', 'header' => 'Name', 'value' => $model->getName()), 'id', array('name' => 'store_id', 'type' => 'raw', 'value' => !empty($model->store) ? TbHtml::link(TbHtml::encode($model->store->name), array("store/view", "id" => $model->store_id)) : null), array('name' => 'image', 'type' => 'raw', 'value' => !empty($model->images) ? TbHtml::image(TbHtml::encode(UtilityHelper::getPublishPath($model->images[0]->source)), Yii::t('label', 'Image')) : null, 'cssClass' => 'gridimage'), array('name' => 'parent_id', 'type' => 'raw', 'value' => !empty($model->parent) ? TbHtml::link(TbHtml::encode($model->parent->getName()), array("category/view", "id" => $model->parent_id)) : null), array('name' => 'top', 'value' => $model->top === '0' ? 'No' : 'Yes', 'filter' => array('0' => 'No', '1' => 'Yes')), 'sort_order', array('name' => 'status', 'value' => $model->status === '0' ? 'No' : 'Yes', 'filter' => array('0' => 'No', '1' => 'Yes')), 'date_added', 'date_modified')));
?>
<div class="hlinks hide">
<div class="uid"><?php 
echo $model->id;
?>
</div>
</div>
Exemple #4
0
    <?php 
echo $form->textFieldControlGroup($model, 'subtitle');
?>

    <div class="control-group">
        <?php 
echo $form->labelEx($model, 'thumb', array('class' => "control-label"));
?>
        <div class="controls" >

            <?php 
if ($this->action->id == 'update' && $model->thumb != '') {
    echo TbHtml::image($model->thumb, '', array('style' => "width:60px;height:60px"));
} else {
    echo TbHtml::image(Yii::app()->getModule('admin')->getAssetsUrl() . '/images/image.png', '', array('style' => "width:60px;height:60px"));
}
?>

            <?php 
echo $form->fileField($model, 'thumb_file');
?>
        </div>
        <?php 
echo $form->error($model, 'thumb_file');
?>
    </div>

    <?php 
echo $form->textFieldControlGroup($model, 'aliases');
?>
Exemple #5
0
<?php

$this->widget('bootstrap.widgets.TbAlert');
?>
 
<?php 
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array(array('name' => 'title', 'header' => 'Title', 'value' => $model->getTitle()), 'link', array('name' => 'image', 'type' => 'raw', 'value' => !empty($model->images) ? TbHtml::image(TbHtml::encode(Yii::app()->getBaseUrl() . $model->images[0]->source), Yii::t('label', 'Image')) : null))));
?>
<div class="hlinks hide">
<div class="uid"><?php 
echo $model->id;
?>
</div>
</div>
Exemple #6
0
<?php

$this->widget('bootstrap.widgets.TbAlert');
?>
 
<?php 
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array(array('name' => 'name', 'header' => 'Name', 'value' => $model->getName()), 'id', 'model', 'sku', 'upc', 'ean', 'jan', 'isbn', 'mpn', 'location', 'quantity', 'stock_status_id', array('name' => 'image', 'type' => 'raw', 'value' => !empty($model->thumbs) ? TbHtml::image(TbHtml::encode(UtilityHelper::yiiparam('frontPath') . '/www' . $model->thumbs[0]->source), Yii::t('label', 'Image')) : null, 'cssClass' => 'gridimage'), 'manufacturer_id', 'shipping', 'price', 'points', 'tax_class_id', 'date_available', 'weight', 'weight_class_id', 'length', 'width', 'height', 'length_class_id', 'subtract', 'minimum', 'sort_order', 'status', 'date_added', 'date_modified', 'viewed')));
?>
<div class="hlinks hide">
<div class="uid"><?php 
echo $model->id;
?>
</div>
</div>
if (isset($error_message)) {
    echo TbHtml::alert(TbHtml::ALERT_COLOR_ERROR, $error_message);
    exit;
}
?>
<div class="container" id="receipt_wrapper"> 
    <div class="row">
        <div class="col-xs-5">
            <!-- <div class="panel panel-default"> -->
                <!-- <div class="panel-body"> -->
                    <p>
                        <?php 
if (Yii::app()->settings->get('receipt', 'printcompanyLogo') == '1') {
    ?>
                            <?php 
    echo TbHtml::image(Yii::app()->baseUrl . '/images/tube3.jpg', 'Company\'s logo', array('width' => '70'));
    ?>
 <br>
                            <!-- <h5> Tube Plastic </h5> -->
                        <?php 
}
?>
                    </p>
                <!-- </div> -->
            <!-- </div> -->
        </div>
        <div class="col-xs-6 col-xs-offset-1 text-right">
            <!-- <div class="panel panel-default"> -->
                    <p>
                        <?php 
if (Yii::app()->settings->get('receipt', 'printcompanyName') == '1') {