<?php

namespace Dashboard\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Dashboard\Form\MemberShipPackageAddNewForm;
use Zend\View\Model\ViewModel;

class MemberShipPackageController extends AbstractActionController {
    
    public function indexAction(){
        
       
        $membershipListing = [
            '0'=>[
                'id'=>'1',
                'package_name'=>'Silver',
                'cost'=>'India',
                'validity'=>'Delhi',
                'images'=>'',
                'data1'=>'',
                'data2'=>'',
            ],
            '1'=>[
                 'id'=>'2',
                'package_name'=>'Gold',
                'cost'=>'India',
                'validity'=>'Delhi',
                'images'=>'',
                'data1'=>'',
                'data2'=>'',
            ],
            '2'=>[
                 'id'=>'3',
                'package_name'=>'Silver',
                'cost'=>'India',
                'validity'=>'Delhi',
                'images'=>'',
                'data1'=>'',
                'data2'=>'',
            ],
            '3'=>[
                 'id'=>'4',
                'package_name'=>'Gold',
                'cost'=>'India',
                'validity'=>'Delhi',
                'images'=>'',
                'data1'=>'',
                'data2'=>'',
            ]
            
        ];
        // print_r($membershipListing); die;
       // \Zend\Debug\Debug::dump($membershipListing); 
        $viewModel = new ViewModel(['membershipListing'=>$membershipListing]);
        return $viewModel;
    }
    
    public function addNewAction(){
        
        $form = new MemberShipPackageAddNewForm();
        $viewModel = new ViewModel(['form'=>$form]);
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
}

