You are here

public function commerce_customer_handler_area_empty_text::render in Commerce Core 7

Render the area.

Overrides views_handler_area::render

File

modules/customer/includes/views/handlers/commerce_customer_handler_area_empty_text.inc, line 28

Class

commerce_customer_handler_area_empty_text
Area handler to display the empty text message for customer profiles.

Code

public function render($empty = FALSE) {

  // If the View contains exposed filter input, the empty message indicates
  // no customer profiles matched the search criteria.
  $exposed_input = $this->view
    ->get_exposed_input();
  if (!empty($exposed_input)) {
    return t('No customer profiles match your search criteria.');
  }

  // Otherwise display the empty text indicating no customer profiles have
  // been created yet and provide a link to the add form if configured.
  if (!empty($this->options['add_path'])) {
    return t('No customer profiles have been created yet. <a href="!url">Add a customer profile</a>.', array(
      '!url' => url($this->options['add_path']),
    ));
  }
  else {
    return t('No customer profiles have been created yet.');
  }
}