name = __('Search engine index'); $this->task = __('Index all posts'); $this->step_task = __('next'); $this->step = __('Indexing entry %d to %d.'); $this->success = __('Entries index done.'); $this->error = __('Failed to index entries.'); } public function execute() { $this->code = $this->core->indexAllPosts($this->code, $this->limit); return $this->code ? $this->code : true; } public function task() { return $this->code ? $this->step_task : $this->task; } public function step() { return $this->code ? sprintf($this->step, $this->code - $this->limit, $this->code) : null; } public function success() { return $this->code ? sprintf($this->step, $this->code - $this->limit, $this->code) : $this->success; } }