<?php
/**
 * Created by PhpStorm.
 * User: JCastro
 * Date: 05/04/16
 * Time: 4:32 PM
 */

namespace AnalyticsForAMP;


use WPExpress\Admin\BaseSettingsPage;

class Analytics extends BaseSettingsPage
{
    public function __construct()
    {
        parent::__construct('Analytics for AMP', 'manage_options');
        $this->setPageDescription('This adds the correct Analytics code to the AMP pages.');
        $this->addPageOptions();
    }

    private function addPageOptions()
    {
        // Add a text Field
        $this->fields->addTextInput('analytics')->setAttribute('placeholder', 'Google Analytics Account ID');
        $this->fields->setValue( $this->getOptionValue('analytics') );
    }
}