Transforms a template into an expanded output using the given model.

@param model
the model used to evaluate expressions inside the template
@return the expanded output
428866
public String transform(Map<String, Object> model, Locale locale,
			ProcessListener processListener) {
		return transform(model, locale, engine.getModelAdaptor(), processListener);
	}
603042
public static <T> MultiLineLabel newMultiLineLabel(final String id, final IModel<T> model)
	{
		final MultiLineLabel multiLineLabel = new MultiLineLabel(id, model);
		multiLineLabel.setOutputMarkupId(true);
		return multiLineLabel;
	}
187236
protected function runSerializeTransformsOnModel(Model $model)
    {
        // Loop through all the transform functions
        foreach ($this->serialize_transforms as $transform) {

            // Call the transform and if nothing is retuned, return nothing. This will
            // be used by runSerializeTransformsOnCollection() to filter out models.
            if (!$model = call_user_func($transform, $model)) {
                return;
            }
        }

        // Return the transformed model
        return $model;
    }
769804
public <V> ResultTransformer<Map<K, V>> as(FactoryExpression<V> expression) {
        final FactoryExpression<?> transformation = FactoryExpressionUtils.wrap(expression);
        List<Expression<?>> args = transformation.getArgs();
        return new GroupByMap<K, V>(key, args.toArray(new Expression<?>[args.size()])) {

            @Override
            protected Map<K, V> transform(Map<K, Group> groups) {
                Map<K, V> results = new LinkedHashMap<K, V>((int) Math.ceil(groups.size() / 0.75), 0.75f);
                for (Map.Entry<K, Group> entry : groups.entrySet()) {
                    results.put(entry.getKey(), transform(entry.getValue()));
                }
                return results;
            }

            @SuppressWarnings("unchecked")
            protected V transform(Group group) {
                // XXX Isn't group.toArray() suitable here?
                List<Object> args = new ArrayList<Object>(groupExpressions.size() - 1);
                for (int i = 1; i < groupExpressions.size(); i++) {
                    args.add(group.getGroup(groupExpressions.get(i)));
                }
                return (V) transformation.newInstance(args.toArray());
            }

        };
    }
247566
public function transform(Arrayable $model)
    {
        $model = array_reduce($this->transformers, function ($carry, IDataTransformer $transformer) {
            return collect($transformer->transform($carry));
        }, $model);
        return parent::transform($model);
    }
4660
function expandModel (model, view) {
  const modelPath = new BunsenModelPath(model)
  const modelExpansions = aggregateModels(view, modelPath)
  let newModel = model
  _.forEach(modelExpansions, (propertyModel, path) => {
    newModel = addBunsenModelProperty(newModel, propertyModel, path)
  })
  return newModel
}
999965
def get_templates(model):
    
    for template_name, template in templates.items():
        if issubclass(template.model, model):
            yield (template_name, template.layout._meta.verbose_name)
24507
public TemplateInstanceExecution templateInstanceExecution(String sourceName, ExpressionEngine expressionEngine) {
        // Transforms each parameter in a name/value pair, using only the source name as input
        Map<String, String> sourceNameInput = Collections.singletonMap("sourceName", sourceName);
        Map<String, String> parameterMap = Maps.transformValues(
                Maps.uniqueIndex(
                        parameters,
                        TemplateParameter::getName
                ),
                parameter -> expressionEngine.render(parameter.getExpression(), sourceNameInput)
        );
        // Concatenates the maps
        Map<String, String> inputMap = new HashMap<>(sourceNameInput);
        inputMap.putAll(parameterMap);
        // Resolves the final expression
        return new TemplateInstanceExecution(
                value -> expressionEngine.render(value, inputMap),
                parameterMap
        );
    }
832839
protected Assertion getAssertionFrom(final Map<String, Object> model) {
        return (Assertion) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ASSERTION);
    }
157227
protected NavigationPanel<WizardModelStateMachine<T>> newNavigationPanel(
		Model<WizardModelStateMachine<T>> model)
	{
		final NavigationPanel<WizardModelStateMachine<T>> navigationPanel = new NavigationPanel<WizardModelStateMachine<T>>()
		{

			/** The Constant serialVersionUID. */
			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void onCancel()
			{
				AbstractWizardPanel.this.onCancel();
			}

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void onFinish()
			{
				AbstractWizardPanel.this.onFinish();
			}

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void onNext()
			{
				AbstractWizardPanel.this.onNext();
			}

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void onPrevious()
			{
				AbstractWizardPanel.this.onPrevious();
			}
		};
		return navigationPanel;
	}
1248954
public function process(Model $model)
    {
        $object = $model->getData();
        // Output data from the class.
        return $this->pool->render->renderExpandableChild(
            $model->setType(static::TYPE_CLASS)
                ->addParameter(static::PARAM_DATA, $object)
                ->addParameter(static::PARAM_NAME, $model->getName())
                ->setNormal('\\' . get_class($object))
                ->setDomid($this->generateDomIdFromObject($object))
                ->injectCallback(
                    $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Callback\\Analyse\\Objects')
                )
        );
    }
1323938
protected function serializeModel($model)
    {
        if ($this->request->getIsHead()) {
            return null;
        }

        [$fields, $expand] = $this->getRequestedFields();
        return $model->toArray($fields, $expand);
    }
1204546
protected function serializeModel($model)
    {
        list ($fields, $expand) = $this->getRequestedFields();
        return $model->toArray($fields, $expand);
    }
1205887
@Override public void setModel(TableModel model)
   {
      super.setModel(model);
      int columns = model.getColumnCount();
      TableColumnModel tableColumnModel = getColumnModel();
      for (int index = 0; index < columns; index++)
      {
         tableColumnModel.getColumn(index).setPreferredWidth(m_columnWidth);
      }
   }
1298226
static List<List<String>> handleNewLines( List<List<String>> tableModel ) {
        List<List<String>> result = Lists.newArrayListWithExpectedSize( tableModel.size() );

        for( List<String> row : tableModel ) {
            if( hasNewline( row ) ) {
                result.addAll( splitRow( row ) );
            } else {
                result.add( row );
            }
        }

        return result;
    }
38304
private List<String> transformSimpleSequenceAsStringList(SimpleSequence sequence, String paramName)
            throws TemplateModelException {
        List<String> list = new ArrayList<>();
        int size = sequence.size();
        for (int i = 0; i < size; i++) {
            TemplateModel model = sequence.get(i);
            if (!(model instanceof SimpleScalar)) {
                throw new IllegalArgumentException(paramName + "'s item must be string");
            }
            list.add(((SimpleScalar)model).getAsString());
        }
        return list;
    }
440873
private double getWidthForMappingLine(RendererModel model) {
        double scale = model.getParameter(Scale.class).getValue();
        return mappingLineWidth.getValue() / scale;
    }