Sets the description to an existing field.

@param  string $field
@param  string $description
@return $this
518279
public function setFieldDescription($field, $description)
    {
        $existing = $this->fields->find('Name', $field);
        if (!$existing) {
            throw new InvalidArgumentException(
                sprintf(
                    'Cannot set description of %s. It has not been added to %s.',
                    $field,
                    $this->getDataObjectClass()
                )
            );
        }

        $this->fields->replace(
            $existing,
            ArrayData::create(
                [
                    'Name' => $field,
                    'Description' => $description
                ]
            )
        );

        return $this;
    }
44184
public function setDescription($description)
	{
		$description = strip_tags($description);

		if (mb_strlen($description) > 160) {
			$description = mb_substr($description, 0, 160);
		}

		$this->description = $description;
	}
538228
public function setDescription($description)
    {
        $this->meta()->setDescription($description);
        $this->openGraph()->setDescription($description);
        $this->twitter()->setDescription($description);

        return $this;
    }
624703
public function addField(Field $field)
    {
        $this->fields->set($field->getColumn(), $field);
        
        return $this;
    }
802027
public function requireTerm($field = null, $term)
    {
        $this
            ->createTerm()
            ->setValue($term)
            ->setExclusion(self::OP_REQUIRE)
            ->setField($field)
        ;

        return $this;
    }
261205
public function set($field, $value = null)
    {
        if (! is_array($field)) {
            $field = [$field => $value];
        }

        foreach ($field as $f => $v) {
            $this->update('$set', $f, $v);
        }

        return $this;
    }
855121
public function setDescription($description)
	{
		$description = strip_tags($description);

		if (strlen($description) > $this->maxDescriptionLength) {
			$description = substr($description, 0, $this->maxDescriptionLength);
		}

		$this->description = $description;
	}
828731
public function setProductionDescriptions($descriptions)
    {
        foreach ($descriptions as $description) {
            $description->setVariety($this);
        }
        $this->production_descriptions = $descriptions;

        return $this;
    }
232264
public function setProductDescription($description = '')
    {
        if ($this->isEmpty($description)) {
            throw new TpvException('Add product description');
        }

        $this->_setParameters['DS_MERCHANT_PRODUCTDESCRIPTION'] = trim($description);

        return $this;
    }
336660
public function setDescription($description = null) {

        if ( empty($description) ) $this->description = null;

        else if ( !is_string($description) ) throw new InvalidArgumentException("Invalid RpcMethod description");

        else $this->description = $description;

        return $this;

    }
723595
public function addField(FieldDefinition $field): FieldsAwareDefinitionInterface
    {
        $this->fields[$field->getName()] = $field;

        return $this;
    }
195766
public function field(string $key, $value = null, $description = null)
    {
        if ( ! $field = $this->fields->where('key', $key)->first()) {
            $this->fields->push(
                $field = $this->fields()->firstOrNew(compact('key'))
            );
        }

        $field->setDefaultValue($value);
        $field->setDefaultDescription($description);

        $field->save();

        return $field;
    }
29992
public function setDescription($description)
    {
        if (!is_string($description)) {
            throw new \InvalidArgumentException('The attribute description on the class Entity has to be string (' . gettype($description) . ('object' === gettype($description) ? ' ' . get_class($description) : '') . ' given).');
        }

        $this->description = $description;

        return $this;
    }
109780
public function identity($title, $description)
    {
        $this->title($title);
        $this->meta('description', $description);
        return $this;
    }
424252
public function setDescription($description)
    {
        $this->description = $this->translator()->translation($description);

        if ($this->isPresentable()) {
            foreach ($this->description->data() as $lang => $trans) {
                $this->description[$lang] = $this->resolveUrls($trans);
            }
        }

        return $this;
    }
445092
public function setDescription($description)
    {
        if (strlen($description) == 0) {
            throw new \InvalidArgumentException(sprintf('Channel description should not be empty'));
        }

        $this->description = $description;

        return $this;
    }
810684
public function setDescription(string $description): Poll
    {
        $description = trim($description);
        $this->description = substr($description, 0, min(static::MAX_LENGTH_DESCRIPTION, strlen($description)));

        return $this;
    }