<?php
/**
 * @package     woobooking.Platform
 * @subpackage  Form
 *
 *  Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
namespace WpBookingHotel\Form\fields;
defined('_WPBOOKINGHOTEL_EXEC') or die;
use WpBookingHotel\Form\FormField;

/**
 * Form Field class for the woobooking Platform.
 * Supports a one line text field.
 *
 * @link   http://www.w3.org/TR/html-markup/input.text.html#input.text

 */
class WpBookingHotel_FormFieldSmsAction extends FormField
{
    /**
     * The form field type.
     *
     * @var    string
     */
    protected $type = 'phonenumber';
    /**
     * Name of the layout being used to render the field
     *
     * @var    string
     */
    protected $layout = 'WooBooking.form.field.smsaction.smsaction';
    /**
     * Method to get the data to be passed to the layout for rendering.
     *
     * @return  array
     *
     * @since 3.7
     */
    protected function getLayoutData()
    {
        $data = parent::getLayoutData();
        /* Get the field options for the datalist.
            Note: getSuggestions() is deprecated and will be changed to getOptions() with 4.0. */

        $extraData = array(
            'field_name_smsaction'   => $this->element['field_name_smsaction'],
            'default_smsaction'   => $this->element['default_smsaction'],
        );

        return array_merge($data, $extraData);
    }

}
