retrieve all leaderboard type for associate to storyMapping

@return array $leaderboardTypesArray
324658
public function getLeaderboardTypes()
    {
        $leaderboardTypesArray = array();
        $leaderboardTypesService = $this->getServiceManager()->get('playgroundreward_leaderboardtype_service');
        $leaderboardTypes = $leaderboardTypesService->getLeaderboardTypeMapper()->findAll();
    
        foreach ($leaderboardTypes as $leaderboardType) {
            $leaderboardTypesArray[$leaderboardType->getId()] = $leaderboardType->getName();
        }

        return $leaderboardTypesArray;
    }
774228
protected function getRootTypes() {
    $types = null;
    $config = $this->getConfiguration();

    // get root types from configuration
    // try request value first
    $request = $this->getRequest();
    $rootTypeVar = $request->getValue('rootTypes');
    if ($config->hasValue($rootTypeVar, 'application')) {
      $types = $config->getValue($rootTypeVar, 'application');
      if (!is_array($types)) {
        $types = null;
      }
    }
    if ($types == null) {
      // fall back to root types
      $types = $config->hasValue('rootTypes', 'application');
    }

    // filter types by read permission
    $permissionManager = $this->getPermissionManager();
    $persistenceFacade = $this->getPersistenceFacade();
    $nodes = [];
    foreach($types as $type) {
      if ($permissionManager->authorize($type, '', PersistenceAction::READ)) {
        $node = $persistenceFacade->create($type, BuildDepth::SINGLE);
        $nodes[] = $node;
      }
    }
    return $nodes;
  }
252780
private function getAllInfo()
    {
        $data = [];
        $data_index = 0;
        $top_table = $this->_parser->find('.characters-favorites-ranking-table', 0);
        foreach ($top_table->find('tr[class=ranking-list]') as $each_char) {
            $name_area = $each_char->find('.people', 0);

            $data[$data_index]['rank'] = $this->getRank($each_char);
            $data[$data_index]['id'] = $this->getId($name_area);
            $data[$data_index]['name'] = $this->getName($name_area);
            $data[$data_index]['japanese_name'] = $this->getJapaneseName($name_area);
            $data[$data_index]['image'] = $this->getImage($name_area);
            $data[$data_index]['animeography'] = $this->getRole($each_char, '.animeography');
            $data[$data_index]['mangaography'] = $this->getRole($each_char, '.mangaography');
            $data[$data_index]['favorite'] = $this->getFavorite($each_char);

            $data_index++;
        }

        return $data;
    }
655320
public static function fetchAllPagesPageTypes()
    {
        $types = Symphony::Database()->fetch("SELECT `page_id`,`type` FROM `tbl_pages_types`");
        $page_types = array();

        if (is_array($types)) {
            foreach ($types as $type) {
                $page_types[$type['page_id']][] = $type['type'];
            }
        }

        return $page_types;
    }
1024244
public function findOrCreateLeaderboardByUser($user, $leaderboardType)
    {
        $leaderboardUser = $this->getLeaderboardMapper()->findOneBy(
            array(
                'user' => $user,
                'leaderboardType' => $leaderboardType
            )
        );
        if (empty($leaderboardUser)) {
            $leaderboardUser = new LeaderboardEntity();
            $leaderboardUser->setLeaderboardType($leaderboardType)
                ->setUser($user)
                ->setTotalPoints(0);
            $leaderboardUser = $this->getLeaderboardMapper()->insert($leaderboardUser);
        }

        return $leaderboardUser;
    }
839140
protected function getType()
  {
    if($this->currObj instanceof TeamSpeak3_Node_Server)
    {
      return "server";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Channel)
    {
      return "channel";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Client)
    {
      return "client";
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Servergroup || $this->currObj instanceof TeamSpeak3_Node_Channelgroup)
    {
      return "group";
    }

    return "host";
  }
1047532
protected static function getTypesMap()
    {
        return array_replace([
            self::ID_TYPE_VIN                   => Types\IDEntityVin::class,
            self::ID_TYPE_GRZ                   => Types\IDEntityGrz::class,
            self::ID_TYPE_STS                   => Types\IDEntitySts::class,
            self::ID_TYPE_PTS                   => Types\IDEntityPts::class,
            self::ID_TYPE_BODY                  => Types\IDEntityBody::class,
            self::ID_TYPE_CHASSIS               => Types\IDEntityChassis::class,
            self::ID_TYPE_DRIVER_LICENSE_NUMBER => Types\IDEntityDriverLicenseNumber::class,
        ], static::getExtendedTypesMap());
    }
522149
public function getStoryMappingMapper()
    {
        if (null === $this->storyMappingMapper) {
            $this->storyMappingMapper = $this->serviceLocator->get('playgroundflow_storymapping_mapper');
        }
    
        return $this->storyMappingMapper;
    }
642990
protected function getPageTypes()
    {
        $pageTypes = array();
        foreach (SiteTree::page_type_classes() as $pageTypeClass) {
            $pageTypes[$pageTypeClass] = SiteTree::singleton($pageTypeClass)->i18n_singular_name();
        }
        asort($pageTypes);
        return $pageTypes;
    }
911564
private function getDashboardSection()
    {
        $builder = new TreeBuilder();
        $node = $builder->root('dashboard');

        $node
            ->useAttributeAsKey('name')
            ->prototype('array')
                ->children()
                    ->scalarNode('type')->isRequired()->cannotBeEmpty()->end()
                    ->arrayNode('options')
                        ->useAttributeAsKey('name')
                        ->prototype('scalar')->end()
                        ->defaultValue(array())
                    ->end()
                ->end()
            ->end()
        ;

        return $node;
    }
831753
private function getAllInfo()
    {
        $data = [];
        $result_table = $this->_parser->find('table', 0);
        $result_area = $result_table->find('tr', 0)->next_sibling();
        while (true) {
            $result = [];

            $name_area = $result_area->find('td', 1);

            $result['image'] = $this->getImage($result_area);
            $result['id'] = $this->getId($name_area);
            $result['title'] = $this->getTitle($name_area);
            $result['summary'] = $this->getSummary($name_area);
            $result['type'] = $this->getType($result_area);

            if ($this->_type == 'anime') {
                $result['episode'] = $this->getEpisode($result_area);
            } else {
                $result['volume'] = $this->getEpisode($result_area);
            }

            $result['score'] = $this->getScore($result_area);

            $data[] = $result;

            $result_area = $result_area->next_sibling();
            if (!$result_area) {
                break;
            }
        }

        return $data;
    }
440277
public function addPoints($storyMapping, $user)
    {
        if ($storyMapping->getLeaderboardType() !== null) {
            $leaderboardType = $storyMapping->getLeaderboardType();
        } else {
            $leaderboardType = $this->getLeaderboardTypeService()->getLeaderboardTypeDefault();
        }

        $this->add($storyMapping->getPoints(), $user, $leaderboardType);
    }
276546
public function getItemTypes()
	{
		$usedTypes = array_reduce( $this->elements, function( $carry, $element ) {
			foreach ( $element as $key => $entry )
			{
				$type = $entry['taxonomy_element']['type'];
				if ( empty( $type ) ) continue;

				if ( ! isset( $carry[ $type ] ) )
				{
					$carry[ $type ] = 1;
				}
			}

			return $carry;
		}, array() );

		return array_keys( $usedTypes );
	}
344135
public function listFieldTypesOptions() {
    $field_types_data = $this->loadFieldTypeData();

    $return = [];
    foreach ($field_types_data as $field_type_id => $field_type_info) {
      $return[$field_type_id] = $field_type_info['label'];
    }

    return $return;
  }
431953
public function getCommandHandlerMapping()
    {
        /** @var MigrationRunnerInterface $migrationRunner */
        $migrationRunner = $this->getRunner();
        $factory = new CollectionRunnerFactory($this->publisher, $migrationRunner);
        return [
            CollectionCommand::class => new CollectionHandler($factory),
            ConvergeCommand::class => new ConvergeHandler(),
            SingleCommand::class => new SingleHandler($migrationRunner),
        ];
    }
721123
public function getAllLinkbaseRoleTypes()
	{
		// Gather all role types
		return array_reduce( $this->context->importedSchemas, function( $carry, /** @var XBRL $taxonomy */ &$taxonomy )
		{
			$lrts = $taxonomy->getLinkbaseRoleTypes();

			foreach ( $lrts as $linkbase => $definition )
			{
				if ( isset( $carry[ $linkbase ] ) )
				{
					$carry = array_merge( $carry[ $linkbase ], $definition );
				}
				else
				{
					$carry[ $linkbase ] = $definition;
				}
			}

			return $carry;

		}, array() );
	}
994261
public function leaderboardAction()
    {
        $filter = $this->getEvent()->getRouteMatch()->getParam('filter');
        $p      = $this->getEvent()->getRouteMatch()->getParam('p');

        $beforeLayout = $this->layout()->getTemplate();
        $subViewModel = $this->forward()->dispatch(
            'playgroundreward',
            array('action' => 'leaderboard', 'filter' => $filter, 'p' => $p)
        );

        // suite au forward, le template de layout a changé, je dois le rétablir...
        $this->layout()->setTemplate($beforeLayout);
        $this->layout()->setVariables(
            array(
                'action' => $this->params('action'),
                'game'   => $this->game,
            )
        );

        $subViewModel->setVariables($this->getShareData($this->game));
        $subViewModel->setVariables(array('game' => $this->game, 'user' => $this->user));

        return $subViewModel;
    }