Creates default decorator.

@param ISearchContext $search_context Search context.

@return IPropertyDecorator
351521
public function createDecorator(ISearchContext $search_context)
	{
		$locator_factory = new DefaultElementLocatorFactory($search_context, $this->annotationManager);

		return new DefaultPropertyDecorator($locator_factory, $this);
	}
155296
public function createSearch( $default = false )
	{
		if ( $default === true ) {
			$search = parent::_createSearch('locale.site');
		} else {
			$search = parent::createSearch();
		}

		$expr = array(
			$search->compare( '==', 'locale.site.level', 0 ),
			$search->getConditions(),
		);

		$search->setConditions( $search->combine( '&&', $expr ) );

		return $search;
	}
1217085
public function getModelAdminSearchContext()
    {
        return SearchContext::create(
            get_class($this->getOwner()),
            $this->getOwner()->scaffoldSearchFields(),
            $this->getOwner()->defaultSearchFilters()
        );
    }
654261
protected function _buildQuery(ModelContextInterface $context)
    {
        $model = $context->getSubject();

        if ($model instanceof ModelDatabase && !$context->state->isUnique())
        {
            $state  = $context->state;
            $search = $state->search;

            if ($search)
            {
                $search_column = null;
                $columns       = array_keys($this->getTable()->getColumns());
                
                // Parse $state->search for possible column prefix
                if (preg_match('#^([a-z0-9\-_]+)\s*:\s*(.+)\s*$#i', $search, $matches)) {
                    if (in_array($matches[1], $this->_columns) || $matches[1] === 'id') {
                        $search_column = $matches[1];
                        $search        = $matches[2];
                    }
                }
                
                // Search in the form of id:NUM
                if ($search_column === 'id') {
                    $context->query->where('(tbl.' . $this->getTable()->getIdentityColumn() . ' = :search)')
                        ->bind(array('search' => $search));
                }
                else
                {
                    $conditions = array();
                    foreach ($this->_columns as $column) {
                        if (in_array($column, $columns) && (!$search_column || $column === $search_column)) {
                            $conditions[] = 'tbl.' . $column . ' LIKE :search';
                        }
                    }
                    if ($conditions) {
                        $context->query->where('(' . implode(' OR ', $conditions) . ')')
                            ->bind(array('search' => '%' . $search . '%'));
                    }
                }
            }
        }
    }
406395
public function createDecorator(ISearchContext $search_context)
	{
		$locator_factory = new DefaultElementLocatorFactory($search_context, $this->annotationManager);

		return new TypifiedPropertyDecorator($locator_factory, $this);
	}
302372
def search_url(self, searchterm):
        
        return self.__search(type_attribute=self.__mispurltypes(), value=searchterm)
8009
def context(name):
    ''''''
    def wrapper(func):
        g.theme.context_processors[name] = func
        return func
    return wrapper
461836
protected function filtro($search){
        $filtro = "(&(objectClass=$this->objeto)";
        foreach ($search as $attr => $valor){
            $filtro .= $this->parserFiltro($attr, $valor);
        }
        $filtro .= ")";
        return $filtro;
    }
882162
public function createSearch( $default = false )
	{
		if( $default === true )
		{
			$object = $this->_createSearch( 'price' );
			$currencyid = $this->_getContext()->getLocale()->getCurrencyId();

			if( $currencyid !== null )
			{
				$expr = array(
					$object->compare( '==', 'price.currencyid', $currencyid ),
					$object->getConditions(),
				);

				$object->setConditions( $object->combine( '&&', $expr ) );
			}

			return $object;
		}

		return parent::createSearch();
	}
1281414
public void loadDecorators(FacesContext context, Compiler compiler)
    {
        String param = WebConfigParamUtils.getStringInitParameter(context.getExternalContext(), PARAMS_DECORATORS);
        if (param != null)
        {
            for (String decorator : param.split(";"))
            {
                try
                {
                    compiler.addTagDecorator((TagDecorator) ReflectionUtil.forName(decorator).newInstance());
                    if (log.isLoggable(Level.FINE))
                    {
                        log.fine("Successfully loaded decorator: " + decorator);
                    }
                }
                catch (Exception e)
                {
                    log.log(Level.SEVERE, "Error Loading decorator: " + decorator, e);
                }
            }
        }
    }
418728
def wrap_context(func):
    
    @functools.wraps(func)
    def wrapper(self, request, context):
        return func(self, request, LogFieldsContext(context))

    return wrapper
1145034
public function setDefaultSearch( $search )
    {
        $this->defaultSearch = array();

        foreach ( $search as $column => $spec )
        {
            $this->defaultSearch[$column] = $spec;
        }

        return $this;
    }
15153
protected function getProperties(ISearchContext $search_context)
	{
		$ret = array();
		$reflection = new \ReflectionClass($search_context);

		foreach ( $reflection->getProperties() as $property ) {
			$ret[] = new Property($property, $this->annotationManager);
		}

		return $ret;
	}
7672
function getSearchRange( isDefault ) {
				var searchRange,
					sel = editor.getSelection(),
					editable = editor.editable();

				if ( sel && !isDefault ) {
					searchRange = sel.getRanges()[ 0 ].clone();
					searchRange.collapse( true );
				} else {
					searchRange = editor.createRange();
					searchRange.setStartAt( editable, CKEDITOR.POSITION_AFTER_START );
				}
				searchRange.setEndAt( editable, CKEDITOR.POSITION_BEFORE_END );
				return searchRange;
			}
682836
def _fill_default_values(cls, cls_context, dict_):
        

        dict_with_default_values = dict(dict_)
        params = re.findall(cls._PATTERN_PARAM_NAME_TYPED_ANY,
                            cls_context.__doc__)

        for param in params:
            if param not in dict_with_default_values:
                dict_with_default_values[param] = None

        return dict_with_default_values
580406
public <R> R doInContext(SearchContext context, Supplier<R> action) {
        R result;
        if (context == null) {
            result = action.get();
        } else {
            // store current context (without triggering exception if it was stale)
            SearchContext currentSearchContext = currentContext;
            boolean contextIsStale = currentContextIsStale;

            setCurrentContext(context);
            try {
                result = action.get();
            } finally {
                // make original current context active again
                currentContext = currentSearchContext;
                currentContextIsStale = contextIsStale;
            }
        }
        return result;
    }
460859
public function getSearchDefaults()
    {
        if (! $this->defaultSearchData) {
            $this->defaultSearchData = $this->getDateSelector()->getDefaultSearchData();
        }

        return $this->defaultSearchData;
    }