Returns the palette of the given serie
@param type $Serie
@return null
554502
public function getSeriePalette($Serie)
    {
        if (!isset($this->Data["Series"][$Serie])) {
            return null;
        }

        $Result = [];
        $Result["R"] = $this->Data["Series"][$Serie]["Color"]["R"];
        $Result["G"] = $this->Data["Series"][$Serie]["Color"]["G"];
        $Result["B"] = $this->Data["Series"][$Serie]["Color"]["B"];
        $Result["Alpha"] = $this->Data["Series"][$Serie]["Color"]["Alpha"];

        return $Result;
    }
834594
public function reverseSerie($Series)
    {
        if (!is_array($Series)) {
            $Series = $this->convertToArray($Series);
        }
        foreach ($Series as $Serie) {
            if (isset($this->Data["Series"][$Serie]["Data"])) {
                $this->Data["Series"][$Serie]["Data"] = array_reverse(
                    $this->Data["Series"][$Serie]["Data"]
                );
            }
        }
    }
576743
public function getByMimetype($mimetype)
    {
        if (isset($this->mimetypeMap[$mimetype])) {
            return $this->get($this->mimetypeMap[$mimetype]);
        }

        return null;
    }
18369
private function getVisibleAndEditAbleProperties(PaletteInterface $palette, ModelInterface $model)
    {
        return \array_intersect(
            \array_map(
                function (PropertyInterface $property) {
                    return $property->getName();
                },
                $palette->getVisibleProperties($model)
            ),
            \array_map(
                function (PropertyInterface $property) {
                    return $property->getName();
                },
                $palette->getEditableProperties($model)
            )
        );
    }
251760
public function paginationEpisodesAction(Request $request, $series)
    {
        $em = $this->getDoctrine()->getManager();
        $dql = "SELECT e FROM ".$this->container->getParameter('oktolab_media.episode_class')." e WHERE e.series = :series ORDER By e.firstranAt DESC";
        $query = $em->createQuery($dql);
        $query->setParameter('series', $series->getId());

        $page = $request->query->get('page', 1);
        $results = $request->query->get('results', 20);

        $paginator  = $this->get('knp_paginator');
        $pagination = $paginator->paginate(
            $query,
            $page/*page number*/,
            $results
        );
        $pagination->setUsedRoute('media_episode_paginator', ['series' => $series]);
        $pagination->setParam('series', $series->getId());

        return ['pagination' => $pagination];
    }
667671
public function getType($expr)
	{
		$match = $this->getMatch($expr);

		return (isset($match, $this->matchGroup[$match[0]])) ? $this->matchGroup[$match[0]] : null;
	}
445944
public function getMediaType($mimetype)
    {
        foreach ($this->mediaTypes as $type => $mimeTypes)
        {
            if (in_array($mimetype, $mimeTypes))
            {
                return $type;
            }
        }

        return null;
    }
917304
public function getOptionsForSeries( $series )
    {
        $seriesTitle = $this->getSeriesTitle( $series );
        if (! isset( $this->options['seriesStorage'][$seriesTitle] ) ) {
            throw new \Exception( 'Series not registered with JsWriter' );
        } 
        return $this->options['seriesStorage'][$seriesTitle];
    }
415816
public function setFill($series, $opts = array('use'    => true, 
                                                   'stroke' => false, 
                                                   'color'  => null, 
                                                   'alpha'  => null
                                                  )
                            )
    {
        extract($opts);
        
        $use    = isset( $use)     ? $use    : true;
        $stroke = isset( $stroke ) ? $stroke : false;
        $color  = isset( $color )  ? $color  : null;
        $alpha  = isset( $alpha )  ? $alpha  : null;
        
        $series = $this->getSeriesTitle( $series );
        $this->setNestedOptVal( $this->options, 'seriesStorage', $series, 'fill', $use );
        $this->setNestedOptVal( $this->options, 'seriesStorage', $series, 'fillAndStroke', $stroke);
        
        $this->options['seriesStorage'][$series]['fill'] = $use;
        $this->options['seriesStorage'][$series]['fillAndStroke'] = $stroke;
        
        if (! empty( $color ) ) {
            $this->setNestedOptVal( $this->options, 'seriesStorage', $series, 'fillColor', $color );
        }
        if (! empty( $alpha ) ) {
            $this->setNestedOptVal( $this->options, 'seriesStorage', $series, 'fillAlpha', $alpha );
        }

        return $this;
    }
378031
public function get($type)
    {
        $collection = new Collection();

        foreach ($this->notifications as $key => $message) {
            if ($message->getType() == $type) {
                $collection->add($message);
            }
        }

        return $collection;
    }
462598
public function getSeriesOption( $series, $option, $default = null )
    {
        $seriesTitle = $this->getSeriesTitle( $series ); 

        return ( isset( $this->options['seriesStorage'][$seriesTitle] ) && isset( $this->options['seriesStorage'][$seriesTitle][$option] ) )
            ?  $this->options['seriesStorage'][$seriesTitle][$option]
            :  $default;
    }
279886
public function getCoefficientOfVariation($Serie)
    {
        if (isset($this->Data["Series"][$Serie])) {
            $Average = $this->getSerieAverage($Serie);
            $StandardDeviation = $this->getStandardDeviation($Serie);

            if ($StandardDeviation != 0) {
                return $StandardDeviation / $Average;
            }
        }
        return null;
    }
529883
public function getStateColor($state)
    {
        if ($state instanceof StatableInterface) {
            $state = $state->getState();
        }

        return empty($this->colors['state'][$state])
            ? $this->options['state']['default_color']
            : $this->colors['state'][$state]
        ;
    }
1156834
public function getSum($Serie)
    {
        if (isset($this->Data["Series"][$Serie])) {
            return array_sum($this->Data["Series"][$Serie]["Data"]);
        }
        return null;
    }
416525
public function getSeriePercentile($Serie = "Serie1", $Percentil = 95)
    {
        if (!isset($this->Data["Series"][$Serie]["Data"])) {
            return null;
        }

        $Values = count($this->Data["Series"][$Serie]["Data"]) - 1;
        if ($Values < 0) {
            $Values = 0;
        }

        $PercentilID = floor(($Values / 100) * $Percentil + .5);
        $SortedValues = $this->Data["Series"][$Serie]["Data"];
        sort($SortedValues);

        if (is_numeric($SortedValues[$PercentilID])) {
            return $SortedValues[$PercentilID];
        }
        return null;
    }
116780
public function getTypeClass($type)
    {
        if (isset($this->types[$type])) {
            return $this->types[$type];
        }

        if (\class_exists($type)) {
            return $type;
        }

        return null;
    }
584495
public function getDraftRevision($entity)
    {
        $currentRevision = $this->getCurrentRevision($entity);
        $latestRevision = $this->getLatestRevision($entity);

        return ($currentRevision < $latestRevision) ? $latestRevision : null;
    }