本文整理匯總了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();
}