flame/thumbnail-helper
Composer 安装命令:
composer require flame/thumbnail-helper
包简介
Nette template helper for lazy creating of thumbnails
README 文档
README
Nette template helper for lazy creating of thumbnails
###Instalation Examples is based on Nette version 2.0.12, but the package is compatible with @dev version too
##Register "thumb" extension In bootstrap.php
\Flame\Thumb\DI\ThumbExtension::register($configurator);
###Register "thumb" helper
/** * Base presenter for all application presenters. */ abstract class BasePresenter extends Presenter { /** * @param null $class * @return \Nette\Templating\ITemplate */ protected function createTemplate($class = null) { $template = parent::createTemplate($class); /** @var \Flame\Thumb\IRegister $thumb */ $thumb = $this->context->getByType('Flame\Thumb\IRegister'); $thumb->register($template); return $template; } }
###Set variables (Optional) In config.neon
thumb: paths: base: %wwwDir% thumbs: /media/thumbs
That's all! Enjoy it!
统计信息
- 总下载量: 66
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 4
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause-FreeBSD
- 更新时间: 2013-05-12