Esempio n. 1
1
 public function getInstalledTargetItems(Batch $batch)
 {
     $areas = \Concrete\Core\Area\Area::getHandleList();
     asort($areas);
     $items = array();
     foreach ($areas as $area) {
         $item = new TargetItem($this);
         $item->setItemId($area);
         $item->setItemName($area);
         $items[] = $item;
     }
     return $items;
 }
Esempio n. 2
0
 public function getInstalledTargetItems(Batch $batch)
 {
     $ul = new UserList();
     $ul->sortByUserName();
     $users = $ul->getResults();
     $items = array();
     foreach ($users as $user) {
         $item = new TargetItem($this);
         $item->setItemId($user->getUserID());
         $item->setItemName($user->getUserDisplayName());
         $items[] = $item;
     }
     return $items;
 }
 public function getInstalledTargetItems(Batch $batch)
 {
     $db = \Database::connection();
     $em = $db->getEntityManager();
     $query = $em->createQuery('select distinct b from \\PortlandLabs\\Concrete5\\MigrationTool\\Entity\\Import\\Block b
     group by b.type order by b.type asc');
     $types = $query->getResult();
     $items = array();
     foreach ($types as $type) {
         $item = new TargetItem($this);
         $item->setItemId($type->getType());
         $item->setItemName($type->getType());
         $items[] = $item;
     }
     return $items;
 }
 public function getInstalledTargetItems(Batch $batch)
 {
     $templates = Template::getList();
     usort($templates, function ($a, $b) {
         return strcasecmp($a->getPageTemplateName(), $b->getPageTemplateName());
     });
     $items = array();
     foreach ($templates as $template) {
         $item = new TargetItem($this);
         $item->setItemId($template->getPageTemplateHandle());
         $item->setItemName($template->getPageTemplateName());
         $items[] = $item;
     }
     return $items;
 }
 public function getInstalledTargetItems(Batch $batch)
 {
     $list = new BlockTypeList();
     $list->includeInternalBlockTypes();
     $types = $list->get();
     usort($types, function ($a, $b) {
         return strcasecmp($a->getBlockTypeName(), $b->getBlockTypeName());
     });
     $items = array();
     foreach ($types as $type) {
         $item = new TargetItem($this);
         $item->setItemId($type->getBlockTypeHandle());
         $item->setItemName($type->getBlockTypeName());
         $items[] = $item;
     }
     return $items;
 }
 public function __construct(MapperInterface $mapper)
 {
     parent::__construct($mapper);
     $this->setItemId(-1);
     $this->setItemName(t('Ignored'));
 }
 public function getInstalledTargetItems(Batch $batch)
 {
     $keys = CollectionKey::getList();
     usort($keys, function ($a, $b) {
         return strcasecmp($a->getAttributeKeyName(), $b->getAttributeKeyName());
     });
     $items = array();
     foreach ($keys as $ak) {
         $item = new TargetItem($this);
         $item->setItemId($ak->getAttributeKeyHandle());
         $item->setItemName($ak->getAttributeKeyDisplayName());
         $items[] = $item;
     }
     return $items;
 }