public function getPictureInfo($fName) { switch ($this->conf->usedTitle) { case 'filename': return MyFiles::class2name(MyFiles::RemoveExtension($fName), false, true); break; case 'pagetitle': return $this->getPageTitle(); break; case 'predefined': return CHtml::encode(Yii::t('fbgallery', $this->conf->predefinedTitle)); break; } }
/** This method is used to prepare and add pictures list from Database * @param array $arrFiles - contain picture's filename * After database update, $this->imgsOrder is updated too */ public function addImagesToDB($arrFiles) { $arrImgs = array(); foreach ($arrFiles as $fName) { $arrImgs[$fName] = MyFiles::class2name(MyFiles::RemoveExtension($fName), false, true); } if ($this->imgsOrder) { $this->updateOrder(array_merge($this->imgsOrder, $arrImgs)); } else { $this->updateOrder($arrImgs); } }