Get translated Content.

Example: $contentManager->getTranslatedContent(array('id' => $id));

@param array $filter

@return array
326646
public function getTranslatedContent(array $filter)
    {
        $content = $this->getContent($filter);

        if ($content instanceof Content) {
            return $this->translations->findTranslations($content);
        }
    }
924049
private function parseFactory($filter)
    {
        // Define single tasks filter with a callback.
        $callbacks = [
            "bbcode"    => "bbcode2html",
            "clickable" => "makeClickable",
            "shortcode" => "shortCode",
            "markdown"  => "markdown",
            //"geshi"     => "syntaxHighlightGeSHi",
            "nl2br"     => "nl2br",
            "htmlentities" => "htmlentities",
            "purify"    => "purify",
            'anchor4Header' => 'createAnchor4Header',
        ];

        // Do the specific filter
        $text = $this->current->text;
        $frontmatter = $this->current->frontmatter;
        switch ($filter) {
            case "frontmatter":
            case "variable":
                $filterObject = new $this->filters[$filter]();
                $config = $this->getFilterConfig("$filter");
                $res = $filterObject->parse($text, $frontmatter, $config);
                $this->current->text = $res["text"];
                $this->current->frontmatter = $res["frontmatter"];
                break;

            case "jsonfrontmatter":
                $res = $this->jsonFrontMatter($text);
                $this->current->text = $res["text"];
                $this->addToFrontmatter($res["frontmatter"]);
                break;

            case "yamlfrontmatter":
                $res = $this->yamlFrontMatter($text);
                $this->current->text = $res["text"];
                $this->addToFrontmatter($res["frontmatter"]);
                break;

            case "titlefromh1":
                $title = $this->getTitleFromFirstH1($text);
                $this->current->text = $text;
                if (!isset($this->current->frontmatter["title"])) {
                    $this->addToFrontmatter(["title" => $title]);
                }
                break;

            case "titlefromheader":
                $title = $this->getTitleFromFirstHeader($text);
                $this->current->text = $text;
                if (!isset($this->current->frontmatter["title"])) {
                    $this->addToFrontmatter(["title" => $title]);
                }
                break;

            case "bbcode":
            case "clickable":
            case "shortcode":
            case "markdown":
            //case "geshi":
            case "nl2br":
            case "htmlentities":
            case "purify":
            case "anchor4Header":
                $this->current->text = call_user_func_array(
                    [$this, $callbacks[$filter]],
                    [$text]
                );
                break;

            default:
                throw new Exception("The filter '$filter' is not a valid filter     string.");
        }
    }
1171408
public function findAllByLocale($locale, $filter = array())
    {
        if (empty($filter)) {
            $order = $this->orderRepository->findAllByLocale($locale);
        } else {
            $order = $this->orderRepository->findByLocaleAndFilter($locale, $filter);
        }

        if ($order) {
            array_walk(
                $order,
                function (&$order) use ($locale) {
                    $order = $this->orderFactory->createApiEntity($order, $locale);
                    $this->updateApiEntity($order, $locale);
                }
            );
        }

        return $order;
    }
356862
public function getTranslations(
        array $domains = [],
        array $languages = [],
        callable $filter = null
    ) : array {
        return $this
            ->repositoryCollection
            ->getTranslations(
                $domains,
                $languages,
                $filter
            );
    }
1230411
function getTerms($taxonomy, array $filter = array())
    {
        $params = array(1, $this->username, $this->password, $taxonomy, $filter);

        return $this->sendRequest('wp.getTerms', $params);
    }
145124
public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
    {
        if (!isset($this->currentTranslations[$locale])) {
            if (null !== $this->collSmartyFilterI18ns) {
                foreach ($this->collSmartyFilterI18ns as $translation) {
                    if ($translation->getLocale() == $locale) {
                        $this->currentTranslations[$locale] = $translation;

                        return $translation;
                    }
                }
            }
            if ($this->isNew()) {
                $translation = new ChildSmartyFilterI18n();
                $translation->setLocale($locale);
            } else {
                $translation = ChildSmartyFilterI18nQuery::create()
                    ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale))
                    ->findOneOrCreate($con);
                $this->currentTranslations[$locale] = $translation;
            }
            $this->addSmartyFilterI18n($translation);
        }

        return $this->currentTranslations[$locale];
    }
1024937
protected function loadFilter($filter)
	{
		static $misses = [];

		if ( ! in_array($filter, $misses))
		{
			try
			{
				if ($obj = \Dependency::resolve('security.filter.'.strtolower($filter), array($this)))
				{
					$this->filters[strtolower($filter)] = $obj;

					return true;
				}
			}
			catch (\Fuel\Dependency\ResolveException $e)
			{
				// we don't have a class for this filter
				$misses[] = $filter;
			}
		}

		return false;
	}
1034771
public function findAllByLocale($locale, $filter = array())
    {
        if (empty($filter)) {
            $items = $this->itemRepository->findAllByLocale($locale);
        } else {
            $items = $this->itemRepository->findByLocaleAndFilter($locale, $filter);
        }

        array_walk(
            $items,
            function (&$item) use ($locale) {
                $item = $this->itemFactory->createApiEntity($item, $locale);
            }
        );

        return $items;
    }
1176035
protected function getUserAnnouncementsFilter(string $filter = null)
    {
        $mappingConfiguration = new PropertyMappingConfiguration();
        return $this->convertAnnouncementsFilter($mappingConfiguration, $filter);
    }
567532
protected function translateCriteria(array $filter, array &$joins)
    {
        list($column, $type) = $this->join(explode('.', $filter['column']), $joins);

        switch (true) {
            case is_array($filter['value']):
                $values = [];

                foreach ($filter['value'] as $value) {
                    $values[] = $this->adapter->getDriver()->quote($value, $type);
                }

                $comparison = ' IN (' . implode(', ', $values) . ')';
                break;

            case is_null($filter['value']):
                $comparison = ' IS NULL';
                break;

            default:
                $comparison = ' = ' . $this->adapter->getDriver()->quote($filter['value'], $type);
        }

        return $column . $comparison;
    }
290002
public function exportGroups($filter = array()) {
        $items = $this->getGroups($filter);
        $exports = array();
        foreach ($items as $item) {
            if (!empty($item['STRING_ID'])) {
                $exports[] = $this->prepareExportGroup($item);
            }

        }
        return $exports;
    }
922886
public function getAll($filter = null)
    {
        $className = self::getEntitiesClassName();
        $results = $this->getDataSource()->retrieveAll($filter);

        // Convert the resulting data to entities.
        $entities = array();
        foreach ($results as $data) {
            $id = @$data['id'];
            $entity = $this->getEntity($id);
            if (empty($entity)) {
                $entity = new $className($data);
            }
            $entities[] = $entity;
        }

        return $entities;
    }
1226445
public static function getCategories($filter = array())
    {
        $filter = Filter::create($filter);
        return self::getCollection('/categories' . $filter->toQuery(), 'Category');
    }
951607
public function exportAgents($filter = array()) {
        $agents = $this->getList($filter);

        $exportAgents = array();
        foreach ($agents as $agent) {
            $exportAgents[] = $this->prepareExportAgent($agent);
        }

        return $exportAgents;
    }
333151
protected function getTodoFieldFilter(array $languageFilter)
    {
        $translationFilter = null;

        if (!empty($languageFilter['languages'])) {
            $translationFilter = array(
                'terms' => array(
                    'fields_doc.meta_language_code_s' => $languageFilter['languages'],
                ),
            );

            if (isset($languageFilter['defaultTranslationToMainLanguage'])) {
                switch ($languageFilter['defaultTranslationToMainLanguage']) {
                    case true:
                        $translationFilter = array(
                            'or' => array(
                                $translationFilter,
                                'term' => array(
                                    'meta_is_main_translation_b' => true,
                                ),
                            ),
                        );
                        break;

                    case 'use_always_available':
                        $translationFilter = array(
                            'or' => array(
                                $translationFilter,
                                'and' => array(
                                    array(
                                        'term' => array(
                                            'always_available_b' => true,
                                        ),
                                    ),
                                    array(
                                        'term' => array(
                                            'meta_is_main_translation_b' => true,
                                        ),
                                    ),
                                ),
                            ),
                        );
                        break;

                    case false:
                        // Nothing to do
                        break;

                    default:
                        throw new \RuntimeException(
                            "Invalid value for 'defaultTranslationToMainLanguage' field filter: expected one of: " .
                            "true, 'use_always_available', false, got: " .
                            var_export($languageFilter['defaultTranslationToMainLanguage'], true)
                        );
                }
            }
        }

        return $translationFilter;
    }
412717
public static function getItems($filter = []): array
    {
        $res = [];

        /* @var $class LightModel */
        $className = get_called_class();
        $class = new $className;

        $sql = 'SELECT * FROM ' . $class->getTableName() . ' WHERE 1=1';
        $params = self::handleFilter($sql, $filter, $class);

        $query = DB::getConnection()->prepare($sql);
        $query->execute($params);

        foreach ($query->fetchAll(PDO::FETCH_CLASS, $className) as $item)
        {
            $res[] = self::typeCastModel($item);
        }

        return $res;
    }
1242927
public function clientList(array $filter = array())
  {
    $clients = array();

    foreach($this->getParent()->clientList() as $client)
    {
      if($client["cid"] == $this->getId())
      {
        $clients[$client->getId()] = $client;
      }
    }

    return $this->filterList($clients, $filter);
  }