You are here

public function GatherContentCurl::getStateDropdown in GatherContent 7.2

Get workflow state dropdown.

File

includes/curl.inc, line 222
Contains functions used to process and retrieve data from GatherContent.

Class

GatherContentCurl
@file Contains functions used to process and retrieve data from GatherContent.

Code

public function getStateDropdown() {
  $html = '
      <li>
        <a data-custom-state-name="All" href="#change-state"><span class="page-status"></span>  ' . t('All') . '</a>
      </li>';
  if ($this
    ->foreachSafe($this->data['states'])) {
    foreach ($this->data['states'] as $id => $state) {
      $html .= '
        <li>
          <a data-custom-state-name="' . $state->name . '" data-custom-state-id="' . $id . '" href="#change-state"><span class="page-status page-state-color-' . $state->color_id . '"></span> ' . $state->name . '</a>
        </li>';
    }
  }
  $this->data['state_dropdown'] = $this
    ->dropdownHtml('<i class="icon-filter"></i> <span>' . t('All') . '</span>', $html);
}