本文整理汇总了PHP中CWebModule::preinit方法的典型用法代码示例。如果您正苦于以下问题:PHP CWebModule::preinit方法的具体用法?PHP CWebModule::preinit怎么用?PHP CWebModule::preinit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWebModule
的用法示例。
在下文中一共展示了CWebModule::preinit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preinit
protected function preinit()
{
$this->setImport(array('album.models.*', 'album.components.iGalleryItem', 'album.components.iDownloadable', 'album.components.taggableBehavior.*', 'album.components.imageapi.*', 'album.components.imagemodifier.CImageModifier', 'album.uploadify.MUploadify'));
$components = array('image' => array('class' => 'album.components.imageapi.CImage', 'allowedImageExtensions' => array("*.jpg", "*.jpeg", "*.gif", "*.png"), 'presets' => array('original' => array('cacheIn' => 'webroot.uploads.album.original', 'actions' => array()), '160x100' => array('cacheIn' => 'webroot.uploads.album.thumbs.160x100', 'actions' => array('image_resize' => true, 'image_x' => 160, 'image_y' => 100, 'image_ratio_crop' => true, 'image_increase' => false)), '360x220' => array('cacheIn' => 'webroot.uploads.album.thumbs.360x220', 'actions' => array('image_resize' => true, 'image_x' => 360, 'image_y' => 220, 'image_ratio_crop' => true, 'image_increase' => false)), '1150x710' => array('cacheIn' => 'webroot.uploads.album.thumbs.1150x710', 'actions' => array('image_x' => 1150, 'image_y' => 710, 'image_ratio_crop' => true, 'image_resize' => true, 'image_increase' => false)))), 'imagemod' => array('class' => 'CImageModifier'));
$this->setComponents($components);
parent::preinit();
}
示例2: preinit
/**
* Preinits the module, attaches behaviors.
* e.g. UserModuleBehavior or SpaceModuleBehavior
*/
public function preinit()
{
$this->attachBehaviors($this->behaviors());
parent::preinit();
}