public static function getForUser($user) { $entities = array(); $types = Type::getList(); foreach ($types as $t) { $entities = array_merge($entities, $t->getAccessEntitiesForUser($user)); } return $entities; }
<?php if (!is_object($pae)) { ?> <div class="btn-group"> <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"> <i class="icon-plus-sign"></i> <?php echo t('Select'); ?> <span class="caret"></span> </a> <ul class="dropdown-menu"> <?php $category = PermissionKeyCategory::getByHandle($_REQUEST['pkCategoryHandle']); $entitytypes = PermissionAccessEntityType::getList($category); foreach ($entitytypes as $type) { ?> <li><?php echo $type->getAccessEntityTypeLinkHTML(); ?> </li> <?php } ?> </ul> </div> <br/><br/> <?php foreach ($entitytypes as $type) {