/** * @param $propertyName * @return string * */ protected function _getSistemNameProperty($propertyName) { $filterSlugify = new Vlmeh_Filter_Slugify(); $filterSlugify->setSeparator('_'); $result = $filterSlugify->filter($propertyName); return $result; }
public function generateMediaPathAction() { $filterSlugify = new Vlmeh_Filter_Slugify(); $mediaMapper = new Media_Model_Mapper_Media(); $freePathMedia = $mediaMapper->fetchFreeRowColumn('path'); foreach ($freePathMedia as $media) { $filterSlugify->setSeparator('_'); $mediaPath = $filterSlugify->filter($media->name); $media->path = $mediaPath; if (!$this->_validateColumn($mediaPath, 'products', 'path')) { $filterSlugify->setSeparator('-'); $mediaPath = $filterSlugify->filter($media->name); $media->path = $mediaPath; } $mediaMapper = new Media_Model_Mapper_Media(); $mediaMapper->save($media); } return $this->view->entries = $mediaMapper->fetchFreeRowColumn('path'); }