<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/

class Inspira_Form_Admin_Widget_LandingPageMain extends Core_Form_Admin_Widget_Standard
{

  public function init()
  {
    parent::init();

    // Set form attributes
    $this
      ->setTitle('Landing Page')
      ->setDescription('');
      
      $this->addElement('Textarea', 'description', array(
        'label' => 'Description'
      ));


      // Get available files
      $logoOptions = array('' => '');

      $files = Engine_Api::_()->getDbTable('files', 'core')->getFiles(array('fetchAll' => 1, 'extension' => array('gif', 'jpg', 'jpeg', 'png', 'webp', 'svg')));
      foreach( $files as $file ) {
        $logoOptions[$file->storage_path] = $file->name;
      }

      $this->addElement('Select', 'image', array(
        'label' => 'Background Image',
        'multiOptions' => $logoOptions,
      ));

      
  }
}
