本文整理汇总了PHP中Picture::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Picture::getInstance方法的具体用法?PHP Picture::getInstance怎么用?PHP Picture::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Picture
的用法示例。
在下文中一共展示了Picture::getInstance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFileSrc
public function getFileSrc()
{
if (!$this->isNew()) {
return Picture::getInstance('', $this->getObject()->getPicture(), '', 50, 50)->getRawLink('resize');
} else {
return '';
}
}
示例2: getFileSrc
public function getFileSrc($pic)
{
$method = $pic == 'picture' ? 'getPicture' : 'getPictureInactive';
if (!$this->isNew() && $this->getObject()->{$method}()) {
return Picture::getInstance('', $this->getObject()->{$method}(), '', 50, 50)->getRawLink('resize');
} else {
return '';
}
}
示例3: getFileSrcForLang
public function getFileSrcForLang($lang)
{
return $this->getObject()->Translation[$lang]->value ? Picture::getInstance('', $this->getObject()->Translation[$lang]->value, '', 50, 50)->getRawLink('resize') : '';
}
示例4: getMediaWithSize
public function getMediaWithSize($width, $height)
{
return Picture::getInstance('', $this->getPicture(), '', $width, $height)->getRawLink('resize');
}
示例5: url_for
?>
<?php
if ($index + 1 != count($pictures)) {
?>
<a href="<?php
echo url_for('@admin_page?module=product&action=productpicspriority&order=down&id=' . $pict['id']);
?>
">
<img src="/img/admin/sort_down.gif" style="padding:5px" border="0" alt="Down">
</a>
<?php
}
?>
</td>
<td align="center" class="formLabel"><img src="<?php
echo Picture::getInstance('', $pict['file'], '', 70, 70)->getRawLink('resize');
?>
" /></td>
<td align="center" ><input type="checkbox" name="deletepics[]" class="sf_admin_batch_checkbox" value="<?php
echo $pict['id'];
?>
" /></td>
</tr>
<?php
}
?>
</tbody>
</table>
<br />
<input class="formInput" type="submit" name="Salvesta" value="<?php
示例6: url
UL.animals LI.item<?php
echo $pGroup['id'];
?>
A { background: url(<?php
echo Picture::getInstance('', $pGroup['picture_inactive'], '', 36, 36, true)->getRawLink('resize');
?>
) 50% 0 no-repeat; }
UL.animals LI.item<?php
echo $pGroup['id'];
?>
A:hover,
UL.animals LI.item<?php
echo $pGroup['id'];
?>
A.active { background: url(<?php
echo Picture::getInstance('', $pGroup['picture'], '', 36, 36, true)->getRawLink('resize');
?>
) 50% 0 no-repeat; }
<?php
}
?>
</style>
<?php
end_slot();
?>
<?php
slot('product_catalog_overlay');
?>
<!-- Modal Overlay -->