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(); }
/** * Preinits the module, attaches behaviors. * e.g. UserModuleBehavior or SpaceModuleBehavior */ public function preinit() { $this->attachBehaviors($this->behaviors()); parent::preinit(); }