/**
  *
  * @return string of html to display the field
  */
 function display()
 {
     // the actual input
     $input = '<input type="text" size="34" ';
     $input .= 'name="' . $this->_input->html_name() . '" ';
     $input .= $this->_input->html_class() != '' ? 'class="large-text ee_media_url ' . $this->_input->html_class() . '" ' : 'class="large-text ee_media_url" ';
     $input .= 'value="' . $this->_input->raw_value_in_form() . '" ';
     $input .= $this->_input->other_html_attributes() . '>';
     // image uploader
     $uploader = EEH_HTML::link('#', '<img src="' . admin_url('images/media-button-image.gif') . '" >', __('click to add an image', 'event_espresso'), '', 'ee_media_upload');
     //only attempt to show the image if it at least exists
     $image = $this->src_exists($this->_input->raw_value()) ? EEH_HTML::br(2) . EEH_HTML::img($this->_input->raw_value(), __('logo', 'event_espresso'), '', 'ee_media_image') : '';
     // html string
     return EEH_HTML::div($input . EEH_HTML::nbsp() . $uploader . $image, '', 'ee_media_uploader_area');
 }
 /**
  * _setup_payment_options
  * @return \EE_Form_Section_Proper
  */
 public function _setup_payment_options()
 {
     // load payment method classes
     $this->checkout->available_payment_methods = $this->_get_available_payment_methods();
     // switch up header depending on number of available payment methods
     $payment_method_header = count($this->checkout->available_payment_methods) > 1 ? apply_filters('FHEE__registration_page_payment_options__method_of_payment_hdr', __('Please Select Your Method of Payment', 'event_espresso')) : apply_filters('FHEE__registration_page_payment_options__method_of_payment_hdr', __('Method of Payment', 'event_espresso'));
     $available_payment_methods = array('payment_method_header' => new EE_Form_Section_HTML(EEH_HTML::h4($payment_method_header, 'method-of-payment-hdr')));
     // the list of actual payment methods ( invoice, paypal, etc ) in a  ( slug => HTML )  format
     $available_payment_method_options = array();
     $default_payment_method_option = array();
     // additional instructions to be displayed and hidden below payment methods (adding a clearing div to start)
     $payment_methods_billing_info = array(new EE_Form_Section_HTML(EEH_HTML::div('<br />', '', '', 'clear:both;')));
     // loop through payment methods
     foreach ($this->checkout->available_payment_methods as $payment_method) {
         if ($payment_method instanceof EE_Payment_Method) {
             $payment_method_button = EEH_HTML::img($payment_method->button_url(), $payment_method->name(), 'spco-payment-method-' . $payment_method->slug() . '-btn-img', 'spco-payment-method-btn-img');
             // check if any payment methods are set as default
             // if payment method is already selected OR nothing is selected and this payment method should be open_by_default
             if ($this->checkout->selected_method_of_payment == $payment_method->slug() || !$this->checkout->selected_method_of_payment && $payment_method->open_by_default()) {
                 $this->checkout->selected_method_of_payment = $payment_method->slug();
                 $this->_save_selected_method_of_payment();
                 $default_payment_method_option[$payment_method->slug()] = $payment_method_button;
             } else {
                 $available_payment_method_options[$payment_method->slug()] = $payment_method_button;
             }
             $payment_methods_billing_info[$payment_method->slug() . '-info'] = $this->_payment_method_billing_info($payment_method);
         }
     }
     // prepend available_payment_method_options with default_payment_method_option so that it appears first in list of PMs
     $available_payment_method_options = $default_payment_method_option + $available_payment_method_options;
     // now generate the actual form  inputs
     $available_payment_methods['available_payment_methods'] = $this->_available_payment_method_inputs($available_payment_method_options);
     $available_payment_methods = $available_payment_methods + $payment_methods_billing_info;
     // build the available payment methods form
     return new EE_Form_Section_Proper(array('html_id' => 'spco-available-methods-of-payment-dv', 'subsections' => $available_payment_methods, 'layout_strategy' => new EE_Div_Per_Section_Layout()));
 }