Shows a list of assets

@param string $searchTerm An optional search term used for filtering the list of assets
@return string
774254
public function indexAction($searchTerm = '')
    {
        $assets = $this->assetRepository->findBySearchTermOrTags(
            $searchTerm,
            $this->tagRepository->findBySearchTerm($searchTerm)->toArray()
        );

        $this->view->assign('assets', $assets);
    }
1291716
public function search(array $search_terms, array $options = null, OutputInterface $output = null) {
		$arguments = array();
	
		if (is_array($search_terms) && count($search_terms) > 0){
			$arguments['packages'] = $search_terms;
		}
	
		if ($options = $this->prepare_array_input_args($options)){
			$arguments += $options;
		}
	
		return $this->call_command('search', $arguments, $output);
	}
333423
public function scopeSearch($query, $searchTerm, $taxonomy = 'major')
    {
        return $query->whereHas('term', function($q) use($searchTerm, $taxonomy) {
            $q->where('name', 'like', '%'. $searchTerm .'%');
        });
    }
431629
public function search($searchParams = array())
    {
        $queryBuilder = $this->createQueryBuilder('e');

        if (!empty($searchParams)) {
            $searchAttributes = array(
                'recipients',
                'template',
                'sent',
                'variables',
                'token',
            );

            foreach ($searchAttributes as $attribute) {
                if (empty($searchParams[$attribute])) {
                    continue;
                }

                $attributeValue = $searchParams[$attribute];

                $queryBuilder->andWhere('e.'.$attribute.' LIKE :'.$attribute)
                    ->setParameter($attribute, '%'.$attributeValue.'%');
            }
        }

        return $queryBuilder->getQuery();
    }
536656
public function getHtmlAdminParcoursListe($params = array())
    {
        $html     = "<h1>Liste des parcours</h1>";
        $html    .= "<form action='' name='listesParcours' id='listesParcours' method='POST' enctype='multipart/form-data'>";
        $reqListe = "SELECT idParcours,libelleParcours FROM parcoursArt";
        $resListe = $this->connexionBdd->requete($reqListe);
        $t        = new tableau();
        $t->addValue('selection');
        $t->addValue('idParcours');
        $t->addValue('libelle');
        while ($fetchListe = mysql_fetch_assoc($resListe)) {
            $t->addValue("<input type='checkbox' name='selectParcours[]' id='selectParcours".$fetchListe['idParcours']."' value='".$fetchListe['idParcours']."'>");
            $t->addValue("<a href='".$this->creerUrl('', 'modifierParcoursFormulaireAdmin', array('archiIdParcours'=>$fetchListe['idParcours']))."'>".$fetchListe['idParcours']."</a>");
            $t->addValue("<a href='".$this->creerUrl('', 'etapesParcoursFormulaire', array('archiIdParcours'=>$fetchListe['idParcours']))."'>".stripslashes($fetchListe['libelleParcours'])."</a>");
        }
        $html .= $t->createHtmlTableFromArray(3);
        $html .= "<input type='button' name='supprSelection' id='supprSelection' value='Supprimer la sélection' onclick=\"if(confirm('Etes-vous certain de vouloir supprimer les parcours sélectionnés ?')){document.getElementById('listesParcours').action='".$this->creerUrl('supprimerParcours', 'adminListeParcours', array())."';document.getElementById('listesParcours').submit();}\">";
        $html .= "<input type='button' name='ajouterParcours' id='ajouterParcours' value='Ajouter' onclick=\"location.href='".$this->creerUrl('', 'ajouterParcoursFormulaireAdmin', array())."';\">";
        $html .= "</form>";
        return $html;
    }
448941
public function find($searchTerm, $language, $season=1, $episode=null)
    {
        $showId = $this->getShowId($searchTerm);

        if (!$showId) {
            return array();
        }

        $showData = $this->getShowData($showId, $season);

        $results = array();

        $language = strtolower($language);

        $id = 1;

        foreach ($showData as $show) {
            if ($show->episode != $episode) {
                continue;
            }
            if ($language != 'all' && strtolower($show->language) != $language) {
                continue;
            }

            $show->id = $id;

            $results[$id] = $show;

            $id++;
        }

        return $results;
    }
60074
public function search(array $post)
    {
        $sort = (isset($post['sort'])) ? $post['sort'] : '';
        unset($post['sort'], $post['count'], $post['offset'], $post['page']);

        $searches = [];

        foreach ($post as $key => $value) {
            $searches[] = [
                'searchString' => $value,
                'columns' => explode('-', $key),
            ];
        }

        $models = $this->getMapper()->search($searches, $sort);

        return $models;
    }
170575
public function getAssetLocatorList($asset)
    {
        $assetId = Utilities::getEntityId(
            $asset,
            'WindowsAzure\MediaServices\Models\Asset'
        );

        $locatorsList = $this->_getEntityList("Assets('{$assetId}')/Locators");

        $result = [];

        foreach ($locatorsList as $locator) {
            $result[] = Locator::createFromOptions($locator);
        }

        return $result;
    }
632543
def searchadmin(self, searchstring=None):
        
        self._check_auth(must_admin=True)
        is_admin = self._check_admin()
        if searchstring is not None:
            res = self._search(searchstring)
        else:
            res = None
        attrs_list = self.attributes.get_search_attributes()
        return self.temp['searchadmin.tmpl'].render(
            searchresult=res,
            attrs_list=attrs_list,
            is_admin=is_admin,
            custom_js=self.custom_js,
            notifications=self._empty_notification(),
            )
405469
protected function doSearch($search)
    {
        $found = [];
        $result = $this->driver->getFolder(
            $this->container,
            $this->folderPath,
            $this->request->getParameterAsBool('include_files', true),
            $this->request->getParameterAsBool('include_folders', true),
            $this->request->getParameterAsBool('full_tree', false)
        );

        foreach ($result as $rs) {
            if (stripos(basename($rs['path']), $search) !== false) {
                $found[] = $rs;
            }
        }

        return $found;
    }
174343
private function trackRefererSearchTerms($referer, $searchTerms)
    {
        $terms = [];

        foreach (explode(' ', $searchTerms) as $term) {
            $terms[] = $this->makeModel(BindingManager::MODEL_REFERER_SEARCH_TERM)->fill([
                'search_term' => $term,
            ]);
        }

        if (count($terms) > 0)
            $referer->searchTerms()->saveMany($terms);

    }
1241325
public function actionIndex()
    {
        $searchModel = new TermTypeSearch();
        $dataProvider = $searchModel->search(request()->queryParams);

        return $this->render('index', [
            'searchModel'  => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
309326
private function getPropertyFilters($search = '')
    {
        $propertyFilters = [];

        if(is_string($search) && strlen(trim($search)) > 0){
            $propertyFilters[self::LABEL_URI] = $search;
        }
        if(is_array($search)){
            foreach($search as $uri => $value){
                if( is_string($uri) &&
                    (is_string($value) && strlen(trim($value)) > 0) ||
                    (is_array($value) && count($value) > 0) ) {
                    $propertyFilters[$uri] = $value;
                }
            }
        }
        return $propertyFilters;
    }
1284233
public function search(SearchRequest $searchRequest)
    {
        $resultSet = $this->getInitializedSearchResultSet($searchRequest);
        $this->lastResultSet = $resultSet;

        $resultSet = $this->handleSearchHook('beforeSearch', $resultSet);
        if ($this->shouldReturnEmptyResultSetWithoutExecutedSearch($searchRequest)) {
            $resultSet->setHasSearched(false);
            return $resultSet;
        }

        $query = $this->queryBuilder->buildSearchQuery($searchRequest->getRawUserQuery(), (int)$searchRequest->getResultsPerPage(), $searchRequest->getAdditionalFilters());
        $this->initializeRegisteredSearchComponents($query, $searchRequest);
        $resultSet->setUsedQuery($query);

        // performing the actual search, sending the query to the Solr server
        $query = $this->modifyQuery($query, $searchRequest, $this->search);
        $response = $this->doASearch($query, $searchRequest);

        if ((int)$searchRequest->getResultsPerPage() === 0) {
            // when resultPerPage was forced to 0 we also set the numFound to 0 to hide results, e.g.
            // when results for the initial search should not be shown.
            $response->response->numFound = 0;
        }

        $resultSet->setHasSearched(true);
        $resultSet->setResponse($response);

        $this->getParsedSearchResults($resultSet);

        $resultSet->setUsedAdditionalFilters($this->queryBuilder->getAdditionalFilters());

        /** @var $variantsProcessor VariantsProcessor */
        $variantsProcessor = GeneralUtility::makeInstance(
            VariantsProcessor::class,
            /** @scrutinizer ignore-type */ $this->typoScriptConfiguration,
            /** @scrutinizer ignore-type */ $this->searchResultBuilder
        );
        $variantsProcessor->process($resultSet);

        /** @var $searchResultReconstitutionProcessor ResultSetReconstitutionProcessor */
        $searchResultReconstitutionProcessor = GeneralUtility::makeInstance(ResultSetReconstitutionProcessor::class);
        $searchResultReconstitutionProcessor->process($resultSet);

        $resultSet = $this->getAutoCorrection($resultSet);

        return $this->handleSearchHook('afterSearch', $resultSet);
    }
601224
public function facadeSearch(array $params)
	{
		$search = isset($params['q']) ? $params['q'] : null;
		$tag = isset($params['tag']) ? $params['tag'] : null;
		$limit = isset($params['limit']) ? (int) $params['limit'] : 1;

		$post = Post::with(array('tags', 'user'))
			->select('posts.*')
			->join('tags', 'posts.id', '=', 'tags.post_id')
			->orderBy('posts.publish_date', 'desc')
			->where('posts.active', 1)
			->where('posts.publish_date', '<=', new DateTime)
			->distinct();

		if ($search)
		{
			$post->where(function($query) use ($search)
			{
				$query->orWhere('title', 'like', '%'.$search.'%')
							->orWhere('content', 'like', '%'.$search.'%');
			});
		}

		if ($tag)
		{
			$post->where('tags.tag', '=', $tag);
		}

		return $post->skip(0)->take($limit)->get();
	}
1339522
public function assetsList($limit = 25, $offset = 0)
    {
        return $this->auth->request(
            'GET',
            '/assets.json',
            array('query' => array('limit' => (int) $limit, 'offset' => (int) $offset))
        );
    }
807585
public function getTermsObjects()
    {
        $decodedContent = $this->jsonDecode();

        $results = [];

        foreach ($decodedContent['table']['rows'] as $row) {
            $term = new GoogleTrendsTerm();

            $term->term = $row['c'][0]['v'];
            $term->ranking = $row['c'][1]['v'];
            $term->productUrl = $row['c'][2]['v'];
            $term->searchUrl = $row['c'][3]['v'];

            $results[] = $term;
        }

        return $results;
    }