code/SEO_Metadata_SiteTree_DataExtension.php
public function getSEOFields()
    {
        // Variables
        $config = SiteConfig::current_site_config();
        $SEO = [];
        // Canonical
        if ($config->CanonicalEnabled()) {
            $SEO[] = ReadonlyField::create('ReadonlyMetaCanonical', 'link rel="canonical"', $this->owner->AbsoluteLink());
        }
        // Title
        if ($config->TitleEnabled()) {
            $SEO[] = TextField::create('MetaTitle', 'meta title')
                ->setAttribute('placeholder', $this->owner->GenerateTitle());
        }
        // Description
        $SEO[] = TextareaField::create('MetaDescription', 'meta description')
            ->setAttribute('placeholder', $this->owner->GenerateDescriptionFromContent());
        // ExtraMeta
        if ($config->ExtraMetaEnabled()) {
            $SEO[] = TextareaField::create('ExtraMeta', 'Custom Metadata');
        }
        return $SEO;
    }
public function getSEOFields()
    {
        // Variables
        $config = SiteConfig::current_site_config();
        $SEO = [];
        // Canonical
        if ($config->CanonicalEnabled()) {
            $SEO[] = ReadonlyField::create('ReadonlyMetaCanonical', 'link rel="canonical"', $this->owner->AbsoluteLink());
        }
        // Title
        if ($config->TitleEnabled()) {
            $SEO[] = TextField::create('MetaTitle', 'meta title')
                ->setAttribute('placeholder', $this->owner->GenerateTitle());
        }
        // Description
        $SEO[] = TextareaField::create('MetaDescription', 'meta description')
            ->setAttribute('placeholder', $this->owner->GenerateDescriptionFromContent());
        // ExtraMeta
        if ($config->ExtraMetaEnabled()) {
            $SEO[] = TextareaField::create('ExtraMeta', 'Custom Metadata');
        }
        return $SEO;
    }
public function getSEOFields ( ) { // Variables $ config = SiteConfig :: current_site_config ( ) ; $ SEO = [ ] ; // Canonical if ( $ config -> CanonicalEnabled ( ) ) { $ SEO [ ] = ReadonlyField :: create ( 'ReadonlyMetaCanonical' , 'link rel="canonical"' , $ this -> owner -> AbsoluteLink ( ) ) ; } // Title if ( $ config -> TitleEnabled ( ) ) { $ SEO [ ] = TextField :: create ( 'MetaTitle' , 'meta title' ) -> setAttribute ( 'placeholder' , $ this -> owner -> GenerateTitle ( ) ) ; } // Description $ SEO [ ] = TextareaField :: create ( 'MetaDescription' , 'meta description' ) -> setAttribute ( 'placeholder' , $ this -> owner -> GenerateDescriptionFromContent ( ) ) ; // ExtraMeta if ( $ config -> ExtraMetaEnabled ( ) ) { $ SEO [ ] = TextareaField :: create ( 'ExtraMeta' , 'Custom Metadata' ) ; } return $ SEO ; }
Gets SEO fields.

@return array
Gets SEO fields .