/**
  * @param EE_Event $item
  *
  * @return mixed|string
  */
 public function column_id(EE_Event $item)
 {
     $content = $item->ID();
     $content .= '  <span class="show-on-mobile-view-only">' . $item->name() . '</span>';
     return $content;
 }
 /**
  * Gets the event name
  * @param EE_Event $event
  * @return string
  */
 public static function get_event_name($event)
 {
     return $event instanceof EE_Event ? $event->name() : __('Event', 'event_espresso');
 }
 /**
  * 		process_reg_step
  *
  * 		@access 		public
  * 		@return 		string
  */
 public function process_reg_step()
 {
     EE_System::do_not_cache();
     $this->_set_reg_event();
     EE_Registry::instance()->REQ->set_espresso_page(TRUE);
     //what step are we on?
     $cart = EE_Registry::instance()->SSN->cart();
     $step = !$cart instanceof EE_Cart ? 'ticket' : 'questions';
     //if doing ajax then we need to verify the nonce
     if (defined('DOING_AJAX')) {
         $nonce = isset($this->_req_data[$this->_req_nonce]) ? sanitize_text_field($this->_req_data[$this->_req_nonce]) : '';
         $this->_verify_nonce($nonce, $this->_req_nonce);
     }
     switch ($step) {
         case 'ticket':
             //process ticket selection
             $success = EED_Ticket_Selector::instance()->process_ticket_selections();
             if ($success) {
                 EE_Error::add_success(__('Tickets Selected. Now complete the registration.'), 'event_espresso');
             } else {
                 $query_args['step_error'] = $this->_req_data['step_error'] = TRUE;
             }
             if (defined('DOING_AJAX')) {
                 $this->new_registration();
                 //display next step
             } else {
                 $query_args['action'] = 'new_registration';
                 $query_args['processing_registration'] = 1;
                 $query_args['event_id'] = $this->_reg_event->ID();
                 $this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
             }
             break;
         case 'questions':
             if (!isset($this->_req_data['txn_reg_status_change'], $this->_req_data['txn_reg_status_change']['send_notifications'])) {
                 add_filter('FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_false', 15);
             }
             //process registration
             $transaction = EED_Single_Page_Checkout::instance()->process_registration_from_admin();
             if ($cart instanceof EE_Cart) {
                 $grand_total = $cart->get_cart_grand_total();
                 if ($grand_total instanceof EE_Line_Item) {
                     $grand_total->save_this_and_descendants_to_txn();
                 }
             }
             if (!$transaction instanceof EE_Transaction) {
                 $query_args = array('action' => 'new_registration', 'processing_registration' => 2, 'event_id' => $this->_reg_event->ID());
                 if (defined('DOING_AJAX')) {
                     //display registration form again because there are errors (maybe validation?)
                     $this->new_registration();
                     return;
                 } else {
                     $this->_redirect_after_action(FALSE, '', '', $query_args, TRUE);
                     return;
                 }
             }
             /** @type EE_Transaction_Payments $transaction_payments */
             $transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments');
             // maybe update status, and make sure to save transaction if not done already
             if (!$transaction_payments->update_transaction_status_based_on_total_paid($transaction)) {
                 $transaction->save();
             }
             EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
             $this->_req_data = array();
             $query_args = array('action' => 'redirect_to_txn', 'TXN_ID' => $transaction->ID(), 'EVT_ID' => $this->_reg_event->ID(), 'event_name' => urlencode($this->_reg_event->name()), 'redirect_from' => 'new_registration');
             $this->_redirect_after_action(false, '', '', $query_args, true);
             break;
     }
     //what are you looking here for?  Should be nothing to do at this point.
 }
 /**
  * 
  * @return array which can be used for converting to json
  */
 function to_array_for_json()
 {
     $title = $this->_datetime->name() != '' ? $this->_event->name() . ': ' . $this->_datetime->name() : $this->_event->name();
     return array('allDay' => false, 'className' => $this->classname(), 'color' => $this->color(), 'end' => $this->_datetime->end_date('c'), 'event_days' => $this->_datetime->length('days', true), 'event_time' => $this->event_time(), 'event_time_no_tags' => $this->event_time_no_tags(), 'event_img_thumb' => $this->event_img_thumb(), 'eventType' => $this->eventType(), 'description' => apply_filters('FHEE__EE_Datetime_In_Calendar__to_array_for_json__description', $this->description(), $this), 'id' => $this->_event->ID(), 'show_tooltips' => $this->show_tooltips(), 'start' => $this->_datetime->start_date('c'), 'target_date' => $this->_datetime->start_date('Y-m-d'), 'textColor' => $this->textColor(), 'tooltip' => $this->tooltip(), 'tooltip_my' => $this->tooltip_my(), 'tooltip_at' => $this->tooltip_at(), 'tooltip_style' => $this->tooltip_style(), 'title' => apply_filters('FHEE__EE_Datetime_In_Calendar__to_array_for_json__title', $title, $this), 'url' => $this->_event->get_permalink());
 }