public function generateFeeds()
	{
		$this->import(Automator::class, 'Automator');
		$this->Automator->purgeXmlFiles();

		$objFeed = NewsFeedModel::findAll();

		if ($objFeed !== null)
		{
			while ($objFeed->next())
			{
				$objFeed->feedName = $objFeed->alias ?: 'news' . $objFeed->id;
				$this->generateFiles($objFeed->row());
				$this->log('Generated news feed "' . $objFeed->feedName . '.xml"', __METHOD__, TL_CRON);
			}
		}
	}
public function generateFeeds()
	{
		$this->import(Automator::class, 'Automator');
		$this->Automator->purgeXmlFiles();

		$objFeed = NewsFeedModel::findAll();

		if ($objFeed !== null)
		{
			while ($objFeed->next())
			{
				$objFeed->feedName = $objFeed->alias ?: 'news' . $objFeed->id;
				$this->generateFiles($objFeed->row());
				$this->log('Generated news feed "' . $objFeed->feedName . '.xml"', __METHOD__, TL_CRON);
			}
		}
	}
public function generateFeeds ( ) { $ this -> import ( Automator :: class , 'Automator' ) ; $ this -> Automator -> purgeXmlFiles ( ) ; $ objFeed = NewsFeedModel :: findAll ( ) ; if ( $ objFeed !== null ) { while ( $ objFeed -> next ( ) ) { $ objFeed -> feedName = $ objFeed -> alias ? : 'news' . $ objFeed -> id ; $ this -> generateFiles ( $ objFeed -> row ( ) ) ; $ this -> log ( 'Generated news feed "' . $ objFeed -> feedName . '.xml"' , __METHOD__ , TL_CRON ) ; } } }
Delete old files and generate all feeds
Delete old files and generate all feeds