src/SEOTools/OpenGraph.php
public function generate($minify = false)
    {
        $this->setupDefaults();

        $output = $this->eachProperties($this->properties);

        $props = [
            'images'                      => ['image',   true],
            'articleProperties'           => ['article', false],
            'profileProperties'           => ['profile', false],
            'bookProperties'              => ['book',    false],
            'musicSongProperties'         => ['music',   false],
            'musicAlbumProperties'        => ['music',   false],
            'musicPlaylistProperties'     => ['music',   false],
            'musicRadioStationProperties' => ['music',   false],
            'videoMovieProperties'        => ['video',   false],
            'videoEpisodeProperties'      => ['video',   false],
            'videoTVShowProperties'       => ['video',   false],
            'videoOtherProperties'        => ['video',   false],
            'videoProperties'             => ['video',   true],
            'audioProperties'             => ['audio',   true],
            'placeProperties'             => ['place',   false],
            'productProperties'           => ['product', false],
        ];

        foreach ($props as $prop => $options) {
            $output .= $this->eachProperties(
                $this->{$prop},
                $options[0],
                $options[1]
            );
        }

        return ($minify) ? str_replace(PHP_EOL, '', $output) : $output;
    }
public function generate($minify = false)
    {
        $this->setupDefaults();

        $output = $this->eachProperties($this->properties);

        $props = [
            'images'                      => ['image',   true],
            'articleProperties'           => ['article', false],
            'profileProperties'           => ['profile', false],
            'bookProperties'              => ['book',    false],
            'musicSongProperties'         => ['music',   false],
            'musicAlbumProperties'        => ['music',   false],
            'musicPlaylistProperties'     => ['music',   false],
            'musicRadioStationProperties' => ['music',   false],
            'videoMovieProperties'        => ['video',   false],
            'videoEpisodeProperties'      => ['video',   false],
            'videoTVShowProperties'       => ['video',   false],
            'videoOtherProperties'        => ['video',   false],
            'videoProperties'             => ['video',   true],
            'audioProperties'             => ['audio',   true],
            'placeProperties'             => ['place',   false],
            'productProperties'           => ['product', false],
        ];

        foreach ($props as $prop => $options) {
            $output .= $this->eachProperties(
                $this->{$prop},
                $options[0],
                $options[1]
            );
        }

        return ($minify) ? str_replace(PHP_EOL, '', $output) : $output;
    }
public function generate ( $ minify = false ) { $ this -> setupDefaults ( ) ; $ output = $ this -> eachProperties ( $ this -> properties ) ; $ props = [ 'images' => [ 'image' , true ] , 'articleProperties' => [ 'article' , false ] , 'profileProperties' => [ 'profile' , false ] , 'bookProperties' => [ 'book' , false ] , 'musicSongProperties' => [ 'music' , false ] , 'musicAlbumProperties' => [ 'music' , false ] , 'musicPlaylistProperties' => [ 'music' , false ] , 'musicRadioStationProperties' => [ 'music' , false ] , 'videoMovieProperties' => [ 'video' , false ] , 'videoEpisodeProperties' => [ 'video' , false ] , 'videoTVShowProperties' => [ 'video' , false ] , 'videoOtherProperties' => [ 'video' , false ] , 'videoProperties' => [ 'video' , true ] , 'audioProperties' => [ 'audio' , true ] , 'placeProperties' => [ 'place' , false ] , 'productProperties' => [ 'product' , false ] , ] ; foreach ( $ props as $ prop => $ options ) { $ output .= $ this -> eachProperties ( $ this -> { $ prop } , $ options [ 0 ] , $ options [ 1 ] ) ; } return ( $ minify ) ? str_replace ( PHP_EOL , '' , $ output ) : $ output ; }
Generates open graph tags.

@param bool $minify

@return string
Generates open graph tags .