diff --git a/includes/class-CategoryTemplated.php b/includes/class-CategoryTemplated.php index 0283467..e51d193 100644 --- a/includes/class-CategoryTemplated.php +++ b/includes/class-CategoryTemplated.php @@ -1,76 +1,76 @@ . namespace itwikidelbot; /** * Handle a generic category associated to a template */ abstract class CategoryTemplated extends Category { /** * Template name of this category */ const TEMPLATE_NAME = 'TEMPLATE_NAME'; /** * Get the template arguments * * To be overrided * * @return array */ abstract protected function getTemplateArguments(); /** * Get the edit summary for this category from its template * * @return string */ - public function getTemplateSummary() { + public function getTemplatedSummary() { return Template::get( static::TEMPLATE_NAME . '_SUMMARY', $this->getTemplateArguments() ); } /** * Get the page content for this category from its template * * @return string */ - public function getTemplateContent() { + public function getTemplatedContent() { return Template::get( static::TEMPLATE_NAME . '_CONTENT', $this->getTemplateArguments() ); } /** * Save this category from the content of its template * * @return mixed */ public function save() { - return $this->saveByTitleContentSummary( $this->getTitle(), $this->getTemplateContent(), $this->getTemplateSummary() ); + return $this->saveByTitleContentSummary( $this->getTemplatedTitle(), $this->getTemplatedContent(), $this->getTemplatedSummary() ); } /** * Save this category from the content of its template if not exists * * @return bool|mixed */ public function saveIfNotExists() { if( $this->exists() ) { return $this->save(); } return false; } }