get a list of grouped BBCodes
@return \Symbb\Core\BBCodeBundle\Entity\BBCode[]
352436
public function getBBCodes($setId = 1)
    {
        $set = $this->getSet($setId);
        $bbcodes = $set->getCodes();
        return $bbcodes;
    }
105794
public function groupLinksGroupedBySource(){
        return $this->map(function(Link $linkObj){
                        return 
                            ['link' => $linkObj->getAbsoluteUrl(),
                             'source_link' => $linkObj->getParentUrl()];                                
                    })
                    ->unique('link')
                    ->groupBy('source_link');        
    }
1077863
public function getDescendantGroups() {
    if (!isset($this->descendantGroups)) {
      $this->descendantGroups = [];
      if (isset($this->group)) {
        $this->descendantGroups =
          (array) $this->group->getDescendants();
      }
      foreach ($this->groups as $curGroup) {
        $this->descendantGroups =
          array_merge(
              (array) $this->descendantGroups,
              (array) $curGroup->getDescendants()
          );
      }
    }
    return $this->descendantGroups;
  }
827588
public function getGroupIdArr()
    {
        $return = [];
        if ($this->group_ids) {
            $return = array_filter(StringHelper::explode($this->group_ids, ',', true, true), function ($groupId) {
                return is_numeric($groupId) && DpAdminGroup::find()->findByGroupId($groupId)->exists();
            });
        }

        return $return;
    }
1268579
public function getPrefixGroupedMetaBoxes()
    {
        $fields = $this->getFields();

        // Just group by the field key prefix
        // Ex: home_foo would go in the Home section by default
        $groups = array();
        foreach ($fields as $k => $field) {
            $prefix = current(explode('_', $k));
            if (!array_key_exists($prefix, $groups)) {
                $groups[$prefix] = array();
            }

            $groups[$prefix][] = $k;
        }

        return $groups;
    }
1058986
public function groupOptions() {
        return array_map(function ($node) {
            return [$node->getAttribute("value"),
                $this->readOptions($this->xpath->query("./option", $node))];
        }, iterator_to_array($this->xpath->query("./optgroup", $this->domNode)));
    }
544743
public function getChildPlaces(): array
    {
        if ($this->place_name !== '') {
            $parent_text = Gedcom::PLACE_SEPARATOR . $this->place_name;
        } else {
            $parent_text = '';
        }

        return DB::table('places')
            ->where('p_file', '=', $this->tree->id())
            ->where('p_parent_id', '=', $this->id())
            ->orderBy(DB::raw('p_place /*! COLLATE ' . I18N::collation() . ' */'))
            ->pluck('p_place')
            ->map(function (string $place) use ($parent_text): Place {
                return new self($place . $parent_text, $this->tree);
            })
            ->all();
    }
1222692
public static function getConversionGroups() {
		$conversionGroups = array();
		foreach(self::$_conversionUnits as $conversionUnit) {
			$conversionGroups[] = $conversionUnit['Group'];
		}
		return array_merge(array_unique($conversionGroups));
	}
279740
public function getRawAttributes(): array
    {
        $attributes = $this->wrappedEntity->getEntityAttributes();

        foreach ($this->entityMap->getNonEmbeddedRelationships() as $relation) {
            unset($attributes[$relation]);
        }

        if ($this->entityMap->getInheritanceType() == 'single_table') {
            $attributes = $this->addDiscriminatorColumn($attributes);
        }

        $attributes = $this->entityMap->getColumnNamesFromAttributes($attributes);

        $attributes = $this->flattenEmbeddables($attributes);

        $foreignKeys = $this->getForeignKeyAttributes();

        return $this->mergeForeignKeysWithAttributes($foreignKeys, $attributes);
    }
1250803
public function buildGroups($entities, $level = 0) {
		if(!count($this->groupDefinitions)) {
			throw new \RuntimeException('There are no groups defined.');
		}

		// Building groups
		/** @var Group[] $groups */
		$groups = [];
		if(!isset($this->groupDefinitions[$level])) {
			return [];
		}
		$groupDefinition = $this->groupDefinitions[$level];
		$entitiesByGroupUid = [];
		foreach($entities as $entity) {
			$groupUid = $level . '-' . call_user_func($groupDefinition->getUidRetriever(), $entity);
			if(!isset($groups[$groupUid])) {
				$groups[$groupUid] = new Group(
					$groupUid,
					call_user_func($groupDefinition->getGroupDataFactory(), $entity),
					$level,
					$entity
				);
				$entitiesByGroupUid[$groupUid] = [];
			}
			$entitiesByGroupUid[$groupUid][] = $entity;
		}
		foreach($entitiesByGroupUid as $groupUid => $iEntities) {
			$subGroups = $this->buildGroups($iEntities, $level + 1);
			foreach($subGroups as $subGroup) {
				$groups[$groupUid]->addChild($subGroup);
			}
		}

		/** @var IColumnData[][] $columnDatasByGroupUid */
		$columnDatasByGroupUid = [];
		foreach($entitiesByGroupUid as $groupUid => $iEntities) {
			if (!isset($columnDatasByGroupUid[$groupUid])) {
				$columnDatasByGroupUid[$groupUid] = [];
			}
		}

		$groupDefinition = $this->getGroup($level);
		foreach($this->getColumnDefinitions() as $columnId => $columnDefinition) {
			$columnFoundInGroup = false;
			foreach ($groupDefinition->getColumnDefinitionsWithDataFactories() as $columnDefinitionsWithDataFactory) {
				list($groupColumnDefinition, $columnDataFactory) = $columnDefinitionsWithDataFactory;
				if ($columnDefinition->equals($groupColumnDefinition)) {
					foreach($entitiesByGroupUid as $groupUid => $iEntities) {
						$columnDatasByGroupUid[$groupUid][] = $columnDataFactory($iEntities);
					}
					$columnFoundInGroup = true;
					break;
				}
			}
			if(!$columnFoundInGroup) {
				foreach($entitiesByGroupUid as $groupUid => $iEntities) {
					$columnDatasByGroupUid[$groupUid][] = null;
				}
			}
		}

		foreach($columnDatasByGroupUid as $groupUid => $columnDatas) {
			$groups[$groupUid]->setColumnDatas($columnDatas);
		}

		$finalGroups = array_values($groups);
		if(($sortingComparator = $groupDefinition->getSortingComparator()) !== null) {
			usort($finalGroups, $sortingComparator);
		}
		return $finalGroups;
	}
266272
public function getGroupByCols()
    {
        if (!$this->containsAggregates()) {
            return [$this];
        }
        $cols = [];
        foreach ($this->getSourceExpressions() as $sourceExpression) {
            $cols[] = $sourceExpression->getGroupByCols();
        }

        return $cols;
    }
1286433
public function getSiblings() {
        $parent = $this->getParent();
        if (is_null($parent)) {
            // This is the root node.
            return [];
        }

        $children = $parent->getChildren();
        $index = array_search($this, $children);
        unset($children[$index]);
        return $children;
    }
388709
private function getNodes(): array
    {
        return [
            new ConfigurationNode\ViewNode(),
            new ConfigurationNode\DesignNode(),
            new ConfigurationNode\DesignListNode(),
            new ConfigurationNode\DefaultViewTemplatesNode(),
            new ConfigurationNode\HttpCacheNode(),
            new ConfigurationNode\BlockDefinitionNode(),
            new ConfigurationNode\BlockTypeNode(),
            new ConfigurationNode\BlockTypeGroupNode(),
            new ConfigurationNode\LayoutTypeNode(),
            new ConfigurationNode\QueryTypeNode(),
            new ConfigurationNode\PageLayoutNode(),
            new ConfigurationNode\ApiKeysNode(),
            new ConfigurationNode\ValueTypeNode(),
            new ConfigurationNode\DebugNode(),
        ];
    }
1178905
public function getCandidateIds(): array
    {
        $candidateIds = [];

        foreach ($this->candidates as $candidate) {
            $candidateIds[] = $candidate->getId();
        }

        return $candidateIds;
    }
616288
public function getDecorators()
    {
        $found = array($this);
        if (method_exists($this->decoratedBatch, 'getDecorators')) {
            $found = array_merge($found, $this->decoratedBatch->getDecorators());
        }

        return $found;
    }
202210
public function getGroupIds()
    {
        $groups = $this->groups;

        $groupIds = array();
        if (count($groups) > 0) {
            /* @var $group GroupInterface */
            foreach ($groups as $group) {
                $groupIds[] = $group->getId();
            }
        }

        return $groupIds;
    }
247930
public function getGroups()
    {
        $groups = [];

        foreach ($this->rootlineElements as $rootlineElement) {
            $rootlineElementGroups = $rootlineElement->getGroups();
            $groups = array_merge($groups, $rootlineElementGroups);
        }

        $groups = $this->cleanGroupArray($groups);

        return $groups;
    }