Ansel_Form_Image::__construct PHP Метод

__construct() публичный Метод

public __construct ( &$vars, $title )
    public function __construct(&$vars, $title)
    {
        global $gallery;
        parent::__construct($vars, $title);
        $this->setButtons(_("Save"));
        $this->addHidden('', 'actionID', 'text', false);
        $this->addHidden('', 'gallery', 'text', false);
        $this->addHidden('', 'image', 'text', false);
        $this->addHidden('', 'page', 'text', false);
        $filesize = ini_get('upload_max_filesize');
        if (substr($filesize, -1) == 'M') {
            $filesize = $filesize * 1048576;
        }
        $filesize = $this->_get_size($filesize);
        $this->addVariable(_("Make this the default photo for this gallery?"), 'image_default', 'boolean', false);
        $this->addVariable(_("Caption"), 'image_desc', 'longtext', false, false, null, array('4', '40'));
        $this->addVariable(_("Original Date"), 'image_originalDate', 'monthdayyear', true, false, null, array('start_year' => 1900));
        $this->addVariable(_("Tags"), 'image_tags', 'text', false);
        $this->addHidden('', 'image0', 'text', false);
        $upload = $this->addVariable(_("Replace photo with this file"), 'file0', 'file', false, false, _("Maximum photo size:") . ' ' . $filesize, array(false));
        $upload->setHelp('upload');
    }
Ansel_Form_Image