<?php

namespace Blazemedia\Affiliation\Rendering;


class Price extends RenderingTemplate {

    use DirectLink\Params;

    public function __construct() {

        parent::__construct( 'affiliate_price', 'price' );
    }


    /**
     * Stampa il bottone impostato da shortcode, pri   
     */
    public function manageLink( $atts, $content, $tag ) {
        
        $program = strtolower( $atts['program'] ); // { 'amazon', 'ebay' }

        /// ricava i parametri per i link inseriti direttamente in pagina
        $directLinkParams = $this->getDirectLinkParams( $program, $atts['link'] );

        $params = $this->pageData->getParams( $directLinkParams );

        /// richiede il markup del link
        $this->getFormatData( $params );

        return $this->markup;
    }


    public function insertCSS() { }
}


