Create a venue from a description.

@param Description $description The venue description.

@return Venue
9196
public function create(Description $description)
    {
        return new Venue(
            new Identifier($description->getMandatoryProperty('id')),
            $description->getMandatoryProperty('name'),
            $this->getCategories($description),
            $this->getTipGroups($description),
            $this->getPhotoGroups($description),
            $this->contactFactory->create($description->getMandatoryProperty('contact')),
            $this->locationFactory->create($description->getMandatoryProperty('location')),
            $this->detailFactory->create($description)
        );
    }
676176
public function create(Description $description)
    {
        return new CategoryEntity(
            new Identifier($description->getMandatoryProperty('id')),
            $description->getMandatoryProperty('name'),
            $this->getIconUrl($description),
            (bool)$description->getOptionalProperty('primary', false)
        );
    }
927877
public function setDescription($description)
    {
        $this->content = null;
        $this->parsedDescription = null;
        $this->description = trim($description);

        return $this;
    }
1214602
private function getIconUrl(Description $description)
    {
        $icon = $description->getMandatoryProperty('icon');

        return sprintf('%s%s%s', $icon->getMandatoryProperty('prefix'), '88', $icon->getMandatoryProperty('suffix'));
    }
1148319
public function setProfessionalDescriptions($descriptions)
    {
        foreach ($descriptions as $description) {
            $description->setVariety($this);
        }
        $this->professional_descriptions = $descriptions;

        return $this;
    }
82721
public function setDescription($description)
    {
        $stripURLRegex = "/((?<!=\")(http|ftp)+(s)?:\/\/[^<>()\s]+)/i";
        $description = preg_replace($stripURLRegex, '', $description);
        $description = strip_tags($description);
        $description = htmlentities($description);
        $description = str_replace(array('#', '@'), '', $description);
        $description = AnService::get('com:base.template.helper.text')->truncate($description, array('length' => 160));
        $description = trim($description);

        $this->_description = $description;
	}
760478
public function description($description = null)
    {
        if ($description === null) {
            return $this->description;
        }

        $this->description = $description;
    }
109780
public function identity($title, $description)
    {
        $this->title($title);
        $this->meta('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;
	}
634507
public function setDescription($description)
    {
        if (!empty($description)) {
            Yii::$app->view->registerMetaTag(['name' => 'description', 'content' => $description], 'description');
            Yii::$app->view->registerMetaTag(['name' => 'og:description', 'content' => $description], 'og:description');
        }
        return $this;
    }
713870
private function getTips(Description $description)
    {
        return array_map(
            function (\stdClass $tipDescription) {
                return $this->tipFactory->create(new Description($tipDescription));
            },
            $description->getOptionalProperty('items', [])
        );
    }
1013724
public function create(Description $description)
    {
        return new Photo(
            new Identifier($description->getMandatoryProperty('id')),
            (new \DateTimeImmutable())->setTimestamp($description->getMandatoryProperty('createdAt')),
            sprintf(
                '%s%sx%s%s',
                $description->getMandatoryProperty('prefix'),
                $description->getMandatoryProperty('width'),
                $description->getMandatoryProperty('height'),
                $description->getMandatoryProperty('suffix')
            ),
            $description->getMandatoryProperty('visibility')
        );
    }
1183809
public function getByDescription($description)
    {
        if (\is_scalar($description) && ! empty($description = Str::lower(trim((string) $description)))) {
            foreach ($this->items as $repair_method) {
                if (Str::lower($repair_method->getDescription()) === $description) {
                    return $repair_method;
                }
            }
        }
    }
274473
public function setDescription($description)
    {
        $this->description = $description;
        if($this->metaDescription == '') $this->metaDescription = strip_tags(substr ($this->description, 0, 200));

        return $this;
    }
1323702
public function setDescription($description)
    {
        self::writeFullTag(
            $description,
            'description',
            true,
            'video:description',
            $this->validator,
            'validateDescription',
            $this->exception,
            'Provided description value is not a valid.'
        );

        return $this;
    }
181310
public function setPermission($name, $description = null)
    {
        $permission = $this->getPermission($name) ?: $this->createPermission($name);
        if ($description) {
            $permission->description = $description;
        }
        $this->add($permission);

        return $permission;
    }
1279886
public function setAmateurDescriptions($descriptions)
    {
        foreach ($descriptions as $description) {
            $description->setVariety($this);
        }
        $this->amateur_descriptions = $descriptions;

        return $this;
    }