Add the respondent name as a caclulated field to the model
@param \Gems_Model_JoinModel $model
@param string $label
12796
public static function addNameToModel(\Gems_Model_JoinModel $model, $label)
    {
        $nameExpr[]  = "COALESCE(grs_last_name, '-')";
        $fieldList[] = 'grs_last_name';
        if ($model->has('grs_partner_last_name')) {
            if ($model->has('grs_partner_surname_prefix')) {
                $nameExpr[]  = "COALESCE(CONCAT(' ', grs_partner_surname_prefix), '')";
                $fieldList[] = 'grs_partner_surname_prefix';
            }

            $nameExpr[]  = "COALESCE(CONCAT(' ', grs_partner_last_name), '')";
            $fieldList[] = 'grs_partner_last_name';
        }
        $nameExpr[] = "', '";

        if ($model->has('grs_first_name')) {
            if ($model->has('grs_initials_name')) {
                $nameExpr[]  = "COALESCE(grs_first_name, grs_initials_name, '')";
                $fieldList[] = 'grs_first_name';
                $fieldList[] = 'grs_initials_name';
            } else {
                $nameExpr[]  = "COALESCE(grs_first_name, '')";
                $fieldList[] = 'grs_first_name';
            }
        } elseif ($model->has('grs_initials_name')) {
            $nameExpr[]  = "COALESCE(grs_initials_name, '')";
            $fieldList[] = 'grs_initials_name';
        }
        if ($model->has('grs_surname_prefix')) {
            $nameExpr[]  = "COALESCE(CONCAT(' ', grs_surname_prefix), '')";
            $fieldList[] = 'grs_surname_prefix';
        }
        $model->set('name',
                'label', $label,
                'column_expression', new \Zend_Db_Expr("CONCAT(" . implode(', ', $nameExpr) . ")"),
                'fieldlist', $fieldList);
   }
848554
public function saved(Model $model)
    {
        $tags = $this->processTags(request('tags'));
        $this->syncTags($model, $tags);
    }
573010
synchronized public void addLabel(String label) {
        if (!labelMap.contains(label)) {
            labelMap.add(labelCounter++, label);
        }
    }
1018444
public function column($name, $label = '')
    {
        $relationName = $relationColumn = '';

        if (false !== strpos($name, '.')) {
            list($relationName, $relationColumn) = explode('.', $name);

            $relation = $this->model()->eloquent()->$relationName();

            $label = empty($label) ? ucfirst($relationColumn) : $label;

            $name = snake_case($relationName).'.'.$relationColumn;
        }

        $column = $this->addColumn($name, $label);

        if (isset($relation) && $relation instanceof Relation) {
            $this->model()->with($relationName);
            $column->setRelation($relationName, $relationColumn);
        }

        return $column;
    }
569617
public function setLabel(Label $label)
    {
        $label->checkId();
        $label->setScriptEvents(true);
        $this->label = $label;
        return $this;
    }
913367
public function text($field, $label) {
        $element = new Text($this->_entity, $field, $label);
        array_push($this->_elements, $element);

        return $element;
    }
933243
public function addParticipatePage($label)
    {
        $participate = $this->addContainer($label);
        $subscr = $participate->addPage($this->_('Subscribe'), 'pr.participate.subscribe', 'participate', 'subscribe');
        $subscr->addPage(null, 'pr.participate.subscribe', 'participate', 'subscribe-thanks');
        $unsub = $participate->addPage($this->_('Unsubscribe'), 'pr.participate.unsubscribe', 'participate', 'unsubscribe');
        $unsub->addPage(null, 'pr.participate.unsubscribe', 'participate', 'unsubscribe-thanks');

        return $participate;
    }
803512
private void addField(final WComponent input, final String labelText, final String labelHint) {
		WLabel label = new WLabel(labelText, input);
		if (labelHint != null) {
			label.setHint(labelHint);
		}

		layout.addField(label, input);
	}
615505
public static function registerMetaKeywords(Component $model)
    {
	    $modelSeoAttributeName = self::behavior($model)->keywordsAttribute;
	    self::registerSeoMetaTag($model, $modelSeoAttributeName, 'keywords');
    }
244141
public static function modelName($project, $location, $model)
    {
        return self::getModelNameTemplate()->render([
            'project' => $project,
            'location' => $location,
            'model' => $model,
        ]);
    }
178013
public function addLabelDate($name, $label = '')
    {
        $e = new \FrenchFrogs\Form\Element\LabelDate($name, $label);
        $this->addElement($e);

        return $e;
    }
1297487
public function addLabel(Label $label)
    {
        if (!$this->labels->contains($label)) {
            $this->labels->add($label);
            $label->setInteractionMatching($this);
        }
    }
961913
public function addLabel(Doozr_Form_Service_Component_Interface_Html $label)
    {
        $index               = $this->addChild($label);
        $this->index[$index] = self::LABEL;

        (!isset($this->indexReverse[self::LABEL])) ? $this->indexReverse[self::LABEL] = [] : null;
        $this->indexReverse[self::LABEL][]                                            = $index;

        return $index;
    }
312596
public function addMessage($message, $label = 'info')
    {
        if ($this->hasCollector('messages')) {
            /** @var \DebugBar\DataCollector\MessagesCollector $collector */
            $collector = $this->getCollector('messages');
            $collector->addMessage($message, $label);
        }
    }
962833
private function createModel(array $model, $location)
    {
        $name = null;
        if (isset($model['id']) === true) {
            // if model id is set, us it as a name
            $name = trim($model['id']);
        } elseif (isset($model['nickname'], $this->responseClasses[$model['nickname']])) {
            // if custom response class is defined with model nickname, use nickname
            $name = $model['nickname'];
        } elseif (isset($model['type']) === true && $model['type'] === 'array') {
            // if model is of array type
            if (isset($model['items']['$ref']) === true) {
                // E. g. if it's an array of 'Tag' models, call this model 'TagList'.
                $name = $model['items']['$ref'].'List';
            } elseif (isset($model['nickname']) === true) {
                // Fallback generate name from operation nickname (e.g. getTags -> TagList)
                $found = preg_match('/[A-Z]/', $model['nickname'], $matches, PREG_OFFSET_CAPTURE);
                if ($found === 1) {
                    $name = rtrim(substr($model['nickname'], $matches[0][1]), 's').'List';
                }
            }
        }
        // if none of above worked to create a model name, hash model array
        if ($name === null) {
            $name = $model['id'] = 'anon_'.self::hashArray($model);
        }

        // a model is basically a parameter, but has name property added
        $defaults = [
            'name' => $name,
            'type' => 'object',
        ];
        /** @noinspection AdditionOperationOnArraysInspection */
        $data = $this->transformSchema($model + $defaults);
        if ('object' === $data['type']) {
            $data['additionalProperties'] = false;
            // model must have top level properties specified as serialized response type, but no response type itself
            foreach ($data['properties'] as $key => $property) {
                $data['properties'][$key]['location'] = $location;
            }
        } elseif ('array' === $data['type']) {
            $data['location'] = $location;
        }

        // allow result class override
        if (isset($this->responseClasses[$name])) {
            $class = $this->responseClasses[$name];
            $data['class'] = $class;

            if (is_subclass_of($class, ResultInterface::class)) {
                $data['type'] = 'object';
                if (is_array($data['additionalProperties']) === false) {
                    $data['additionalProperties'] = [];
                }
                $data['additionalProperties']['location'] = $location;
            } else {
                $data['type'] = 'class';
            }
        }

        // required makes no sense at root of model
        unset($data['required']);

        return new Parameter($data, ['description' => $this->getServiceDescription()]);
    }
667600
public function addLabelForMenuItem(string $label, string $do = P_DO, string $p = P)
    {
        $this->menu_labels[$p][$do] = $label;

        return $this;
    }
241260
public function matches($field, $label, $message = null)
    {
        $this->setRule(__FUNCTION__, function($val, $args)
                       {
                           return ((string) $args[0] == (string) $val);
                       }, $message, array($this->_getVal($field), $label));
        return $this;
    }