示例#1
0
 public function createPresenter($template, $cacheManager, $childWpHandler)
 {
     $cacheId = $this->request->getForValidation(self::req_cache_id);
     $this->verifyCacheId($template, $cacheId, $cacheManager);
     $presenter = false;
     $childId = $this->request->getForValidation(self::req_child_id);
     $deleteId = $this->request->getForValidation(self::req_delete_id);
     if ($childId || $deleteId) {
         $presenter = $this->createEditDeletePresenter($template, $childWpHandler, $cacheId, $childId, $deleteId);
     } else {
         $presenter = new ChildWp_AddPresenter($this->request, $this->translator);
     }
     $presenter->init($childWpHandler, $cacheId);
     return $presenter;
 }