Type of dish: Dessert
Date: 1/09/19
Number of persons: 1
Preparation time: 10

HI TIM I AM MAKING A BOLD TEST LIVE

Accessing the parameters/options of Custom Fields

Thanks to Tom van der Laan for the tip! Detailed explanation on

https://gist.github.com/TLWebdesign/1764e3b8734ddf54f7f5acc66aca40c2

Example for a custom field of type "list" (type of dish in this demo site)

$this->item->jcfields[2]->fieldparams

object(Joomla\Registry\Registry)#1044 (3) {
  ["data":protected]=>
  object(stdClass)#1069 (2) {
    ["multiple"]=>
    string(0) ""
    ["options"]=>
    object(stdClass)#1071 (3) {
      ["options0"]=>
      object(stdClass)#1070 (2) {
        ["name"]=>
        string(12) "First course"
        ["value"]=>
        string(5) "first"
      }
      ["options1"]=>
      object(stdClass)#1072 (2) {
        ["name"]=>
        string(11) "Main course"
        ["value"]=>
        string(4) "main"
      }
      ["options2"]=>
      object(stdClass)#1073 (2) {
        ["name"]=>
        string(7) "Dessert"
        ["value"]=>
        string(7) "dessert"
      }
    }
  }
  ["initialized":protected]=>
  bool(true)
  ["separator"]=>
  string(1) "."
}

$this->item->jcfields[2]->fieldparams->get('options');

object(stdClass)#1071 (3) {
  ["options0"]=>
  object(stdClass)#1070 (2) {
    ["name"]=>
    string(12) "First course"
    ["value"]=>
    string(5) "first"
  }
  ["options1"]=>
  object(stdClass)#1072 (2) {
    ["name"]=>
    string(11) "Main course"
    ["value"]=>
    string(4) "main"
  }
  ["options2"]=>
  object(stdClass)#1073 (2) {
    ["name"]=>
    string(7) "Dessert"
    ["value"]=>
    string(7) "dessert"
  }
}

$this->item->jcfields[2]->params;

object(Joomla\Registry\Registry)#1068 (3) {
  ["data":protected]=>
  object(stdClass)#1075 (27) {
    ["class"]=>
    string(0) ""
    ["label_class"]=>
    string(0) ""
    ["show_on"]=>
    string(0) ""
    ["render_class"]=>
    string(4) "well"
    ["showlabel"]=>
    string(1) "1"
    ["label_render_class"]=>
    string(0) ""
    ["display"]=>
    string(1) "2"
    ["layout"]=>
    string(0) ""
    ["display_readonly"]=>
    string(1) "2"
    ["assignmentMatchingMethod"]=>
    string(3) "and"
    ["assign_menu"]=>
    string(1) "0"
    ["assign_menu_param_noitem"]=>
    string(1) "0"
    ["assign_menu_param_inc_children"]=>
    int(0)
    ["assign_urls"]=>
    string(1) "0"
    ["assign_urls_list"]=>
    string(0) ""
    ["assign_urls_param_regex"]=>
    string(1) "0"
    ["assign_contentview"]=>
    string(1) "0"
    ["assign_datetime"]=>
    string(1) "0"
    ["assign_datetime_param_publish_up"]=>
    string(0) ""
    ["assign_datetime_param_publish_down"]=>
    string(0) ""
    ["assign_usergroups"]=>
    string(1) "0"
    ["assign_devices"]=>
    string(1) "0"
    ["assign_referrer"]=>
    string(1) "0"
    ["assign_referrer_list"]=>
    string(0) ""
    ["assign_lang"]=>
    string(1) "0"
    ["assign_php"]=>
    string(1) "0"
    ["assign_php_list"]=>
    string(0) ""
  }
  ["initialized":protected]=>
  bool(true)
  ["separator"]=>
  string(1) "."
}

$this->item->jcfields[2]->params->get('render_class');

string(4) "well"