本文整理匯總了PHP中Backend::tplElement方法的典型用法代碼示例。如果您正苦於以下問題:PHP Backend::tplElement方法的具體用法?PHP Backend::tplElement怎麽用?PHP Backend::tplElement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Backend
的用法示例。
在下文中一共展示了Backend::tplElement方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: uploadImageItem
public function uploadImageItem()
{
if ($img = $this->images_model->checkImgUpload()) {
$this->crud_model->update($this->input->post('type'), ['id' => $this->input->post('id'), 'image' => $img]);
echo Backend::tplElement('images/item', ['item' => $this->crud_model->select($this->input->post('type'), ['id' => $this->input->post('id')], 'row'), 'table' => $this->input->post('type')]);
}
}
示例2:
</div>
<div class="tab-pane" id="tab_4">
<div class="form-group">
<div class="btn btn-sm btn-primary uploadNewImage">Загрузить изображение</div><br><br>
<div class="imgsupl"><?php
echo $main->images_model->getImages($data['prod']['id'], 'imagesprods');
?>
</div>
</div>
</div>
<div class="tab-pane" id="tab_6">
<div class="form-group">
<div class="btn btn-sm btn-primary uploadNewImageItem">Загрузить изображение</div><br><br>
<div class="imgsuplItem">
<?php
echo Backend::tplElement('images/item', ['item' => $data['prod'], 'table' => 'products']);
?>
</div>
</div>
</div>
<div class="tab-pane" id="tab_8">
<?php
foreach ($main->catalog_model->select(Catalog_model::$chars) as $char) {
?>
<div class="form-group">
<?php
echo form_label($char['name']);
?>
<?php
echo form_input(['type' => 'text', 'name' => 'chars[' . $char['id'] . ']', 'class' => 'form-control', 'placeholder' => 'Значение'], $main->catalog_model->getCharItemVal($char['id'], $data['prod']['id']));
?>
示例3: form_submit
</div>
<div class="tab-pane" id="tab_4">
<div class="form-group">
<div class="btn btn-sm btn-primary uploadNewImage">Загрузить изображение</div><br><br>
<div class="imgsupl"><?php
echo $main->images_model->getImages($data['service']['id'], 'imagesservices');
?>
</div>
</div>
</div>
<div class="tab-pane" id="tab_6">
<div class="form-group">
<div class="btn btn-sm btn-primary uploadNewImageItem">Загрузить изображение</div><br><br>
<div class="imgsuplItem">
<?php
echo Backend::tplElement('images/item', ['item' => $data['service'], 'table' => 'services']);
?>
</div>
</div>
</div>
</div>
</div>
<?php
echo form_submit('', 'Сохранить', ['class' => 'btn btn-primary']);
?>
<?php
echo form_close();
?>
</div>
</div>
<script>