original_string: protected function getAvailableColors()
      {
          $availableColors = $this->availableColors;
          if (is_array($availableColors)) {
              return $availableColors;
          }
          elseif (is_string($availableColors) && !empty($availableColors)) {
              if ($this->model->methodExists($availableColors)) {
                  return $this->availableColors = $this->model->{$availableColors}(
                      $this->formField->fieldName,
                      $this->formField->value,
                      $this->formField->config
                  );
              } else {
                  throw new ApplicationException(Lang::get('backend::lang.field.colors_method_not_exists', [
                      'model'  => get_class($this->model),
                      'method' => $availableColors,
                      'field'  => $this->formField->fieldName
                  ]));
              }
          }
      }
code: protected function getAvailableColors()
      {
          $availableColors = $this->availableColors;
          if (is_array($availableColors)) {
              return $availableColors;
          }
          elseif (is_string($availableColors) && !empty($availableColors)) {
              if ($this->model->methodExists($availableColors)) {
                  return $this->availableColors = $this->model->{$availableColors}(
                      $this->formField->fieldName,
                      $this->formField->value,
                      $this->formField->config
                  );
              } else {
                  throw new ApplicationException(Lang::get('backend::lang.field.colors_method_not_exists', [
                      'model'  => get_class($this->model),
                      'method' => $availableColors,
                      'field'  => $this->formField->fieldName
                  ]));
              }
          }
      }
code_tokens: protected function getAvailableColors ( ) { $ availableColors = $ this -> availableColors ; if ( is_array ( $ availableColors ) ) { return $ availableColors ; } elseif ( is_string ( $ availableColors ) && ! empty ( $ availableColors ) ) { if ( $ this -> model -> methodExists ( $ availableColors ) ) { return $ this -> availableColors = $ this -> model -> { $ availableColors } ( $ this -> formField -> fieldName , $ this -> formField -> value , $ this -> formField -> config ) ; } else { throw new ApplicationException ( Lang :: get ( 'backend::lang.field.colors_method_not_exists' , [ 'model' => get_class ( $ this -> model ) , 'method' => $ availableColors , 'field' => $ this -> formField -> fieldName ] ) ) ; } } }
docstring: Gets the appropriate list of colors.
  
  @return array
docstring_tokens: Gets the appropriate list of colors .