Get the venue photos.

@param Description $description The photo group description.

@return Photo[]
16385
private function getPhotos(Description $description)
    {
        return array_map(
            function (\stdClass $photoDescription) {
                return $this->photoFactory->create(new Description($photoDescription));
            },
            $description->getOptionalProperty('items', [])
        );
    }
499259
private function getCoordinates(Description $description)
    {
        $latitude  = $description->getOptionalProperty('lat');
        $longitude = $description->getOptionalProperty('lng');

        if ($latitude === null || $longitude === null) {
            return null;
        }

        return new Coordinates($latitude, $longitude);
    }
1148319
public function setProfessionalDescriptions($descriptions)
    {
        foreach ($descriptions as $description) {
            $description->setVariety($this);
        }
        $this->professional_descriptions = $descriptions;

        return $this;
    }
1373500
protected function getSourceAttributes()
    {
        extract($this->resource->getImageGeometry());

        return [
            'width'  => $width,
            'height' => $height,
            'ratio'  => $this->ratio($width, $height),
            'size'   => $this->resource->getImageLength(),
            'type'   => sprintf('image/%s', strtolower($this->resource->getImageFormat())),
        ];
    }
279754
def photos
      return all_photos if @json["photos"].blank?
      @json["photos"]["groups"].select { |g| g["type"] == "venue" }.first["items"].map do |item|
        Foursquare::Photo.new(@foursquare, item)
      end
    end
760478
public function description($description = null)
    {
        if ($description === null) {
            return $this->description;
        }

        $this->description = $description;
    }
116103
public function adminFooterSetting($description)
    {
        // Work on description in case of an array
        $desc = is_array($description) ? $description[0] : $description;

        add_filter('admin_footer_text', function () use ($desc) {
            echo '<span id="footer-thankyou">'.$desc.'</span>';
        });
    }
713870
private function getTips(Description $description)
    {
        return array_map(
            function (\stdClass $tipDescription) {
                return $this->tipFactory->create(new Description($tipDescription));
            },
            $description->getOptionalProperty('items', [])
        );
    }
176522
public function getServiceDescription()
	{
		$list = parent::getServiceDescription();

		$list['Coupon_Code.uploadFile'] = array(
			"parameters" => array(
				array( "type" => "string","name" => "site","optional" => false ),
				array( "type" => "string","name" => "couponid","optional" => false ),
			),
			"returns" => "array",
		);

		$list['Coupon_Code.importFile'] = array(
			"parameters" => array(
				array( "type" => "string","name" => "site","optional" => false ),
				array( "type" => "string","name" => "couponid","optional" => false ),
				array( "type" => "array","name" => "items","optional" => false ),
			),
			"returns" => "array",
		);

		return $list;
	}
1294605
public function getImageCaptionOptions()
    {
        return [
            self::IMAGE_CAPTION_NONE => _t(__CLASS__ . '.NONE', 'None'),
            self::IMAGE_CAPTION_MEDIA => _t(__CLASS__ . '.MEDIADESCRIPTION', 'Media Description'),
            self::IMAGE_CAPTION_COMPONENT => _t(__CLASS__ . '.COMPONENTCAPTION', 'Component Caption')
        ];
    }
1347397
public function setDescription($description)
    {
        // clean and store description
        // if is false, set false
        $this->description = (false == $description) ? $description : strip_tags(htmlentities($description));

        return $this;
    }
987346
public function setPlantDescriptions($descriptions)
    {
        foreach ($descriptions as $description) {
            $description->setVariety($this);
        }
        $this->plant_descriptions = $descriptions;

        return $this;
    }
709512
public static function getExcerptFromHtml($html, $tag)
    {
        $doc = new \DOMDocument();
        $doc->loadHTML($html);
        $images = $doc->getElementsByTagName($tag);
        $excerpt = null;

        foreach ($images as $image) {
            $attributes = [];
            foreach ($image->attributes as $name => $value) {
                $attributes[$name] = $value->value;
            }
            $excerpt = [
                'element' => [
                    'name'       => $image->tagName,
                    'attributes' => $attributes
                ]
            ];
        }

        return $excerpt;
    }
729638
public function setDescription($description)
    {
        $this->metatags()->setDescription($description);
        $this->opengraph()->setDescription($description);
        $this->twitter()->setDescription($description);
        $this->jsonLd()->setDescription($description);

        return $this;
    }
494042
public function log($description = '')
    {
        $payload = [
            'user_id' => auth()->id(),
            'description' => $description,
            'request' => json_encode([
                'url' => request()->url(),
                'method' => request()->method(),
                'query' => request()->fullUrl(),
                'secure' => request()->secure(),
                'client_ip' => request()->ip(),
                'payload' => request()->all(),
            ]),
        ];

        return $this->model->create($payload);
    }
42266
protected function forPictures() : array
    {
        $pictures = Collection::make($this->all())->filter(function($item, $key) {
            return $key == 'pictures';
        })->get('pictures');

        if (is_null($pictures) || empty($pictures['storing'])) {
            return [];
        }

        return Collection::make($pictures['storing'])->mapWithKeys(function($item, $key) {
            return ['pictures.storing.' . $key => [
                'mimes:jpeg,png,jpg',
                Rule::dimensions()->maxWidth(1000)->maxHeight(500)
            ]];
        })->all();
    }
1154366
public function prepareDescriptionForPersist($description)
    {
        $description = html_entity_decode($description);
        $description = strip_tags($description);
        $description = filter_var($description, FILTER_SANITIZE_STRING);

        // remove the encoded blank chars
        $description = str_replace("\xc2\xa0",'',$description);

        $description = trim($description);
        return $description;
    }