public function view()
 {
     $currentPage = Page::getCurrentPage();
     $aftl = new AttributeFormTypeList();
     $aftl->sortByFormName();
     $this->set('formTypes', $aftl->getPage());
     $this->set('formTypesPagination', $aftl->displayPagingV2(Loader::helper('navigation')->getLinkToCollection($currentPage), true));
 }
 public function view($message = false)
 {
     $currentPage = Page::getCurrentPage();
     // set action message if set
     switch ($message) {
         case 'added':
             $this->set('message', t('Form type added'));
             break;
         case 'updated':
             $this->set('message', t('Form type updated'));
             break;
         case 'removed':
             $this->set('message', t('Form type removed'));
             break;
     }
     $aftl = new AttributeFormTypeList();
     $this->set('formTypes', $aftl->getPage());
     $this->set('formTypesPagination', $aftl->displayPagingV2(Loader::helper('navigation')->getLinkToCollection($currentPage), true));
 }
 public function add()
 {
     $formTypes = AttributeFormTypeList::getList();
     $this->set('formTypes', $formTypes);
 }