<?php
/**
 * Number Column
 * 
 * Use this column for displaying formatted numbers
 * 
 * @author Visual Media 
 */

namespace VisualM\ManagementBundle\AdminList\Column;

use DateTime;
use VisualM\ManagementBundle\AdminList\Column\ColumnConfigurationAbstract;
use VisualM\ManagementBundle\AdminList\Column\ColumnConfigurationInterface;

/**
 * Number Column
 *
 * @author Visual Media 
 */
class NumberColumn extends ColumnConfigurationAbstract implements ColumnConfigurationInterface
{
    /**
     * Number format
     * @var string
     */
    private $format;

    /**
     * Decimal places
     * @var int
     */
    private $decimal;

    /**
     * Thousand Seperator
     * @var string
     */
    private $thousandSep;

    /**
     * Decimal point
     * @var string
     */
    private $decimalPoint;

    /**
     * Constructor
     * 
     * @param string  $field        Field (null for no field binding)
     * @param string  $Title        Title
     * @param boolean $sortable     Sortable
     * @param string  $format       Display format
     * @param string  $decimal      Decimal places
     * @param string  $thousandSep  Thousand seperator
     * @param string  $decimalPoint Decimal point
     */
    public function __construct($field, $Title, $sortable = true, $format = '%s', $decimal = 2, $thousandSep = '.', $decimalPoint = ',')
    {
        parent::__construct(
            $field,
            $Title, 
            $sortable,
            'VisualMManagementBundle:AdminList:Column/NumberColumn/listItem.html.twig',
            'VisualMManagementBundle:AdminList:Column/PlainValueColumn/listHeader.html.twig',
            null
        );
        $this->format = $format;
        $this->decimal = $decimal;
        $this->thousandSep = $thousandSep;
        $this->decimalPoint = $decimalPoint;
    }

    public function getFormat()
    {
        return $this->format;
    }

    public function getDecimal()
    {
        return $this->decimal;
    }

    public function getThousandSep()
    {
        return $this->thousandSep;
    }

    public function getDecimalPoint()
    {
        return $this->decimalPoint;
    }



    
}