/**
  * @param IContextSource $context
  * @param string $action
  */
 public function init(IContextSource $context, $action)
 {
     parent::init($context, $action);
     if (!$this->workflow->isNew()) {
         /** @var PostSummaryQuery $query */
         $query = Container::get('query.postsummary');
         $this->formatterRow = $query->getResult($this->workflow->getId());
         if ($this->formatterRow) {
             $this->topicSummary = $this->formatterRow->revision;
         }
     }
 }
 public function init(IContextSource $context, $action)
 {
     parent::init($context, $action);
     // Basic initialisation done -- now, load data if applicable
     if ($this->workflow->isNew()) {
         return;
     }
     // Get the latest revision attached to this workflow
     $found = $this->storage->find('Header', array('rev_type_id' => $this->workflow->getId()), array('sort' => 'rev_id', 'order' => 'DESC', 'limit' => 1));
     if ($found) {
         $this->header = reset($found);
     }
 }