<?php
/**
 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
 * @link      https://cakephp.org CakePHP(tm) Project
 * @since     0.2.9
 * @license   https://opensource.org/licenses/mit-license.php MIT License
 */
namespace App\Controller;



/**
 * Static contact us controller
 *
 * This controller will render views from Template/AboutUs/
 *
 */
class ContactUsController extends ContentController
{
  public function index()
  {
    $this->request = $this->request->withParam('section', 'contact-us');

    parent::index(); // Call the index method from ContactUsController
    // Additional logic for ContentController

    // Load the contact details
    // We will need this for the contact us section
    $contactDetails = $this->Contacts->find('All')->first();

    $this->set(compact('contactDetails'));
  }

  public function contacForm()
  {
    return $this->redirect($this->referer());

  }

}