You are here

public function NodeRegistrationNodeSettings::setting in Node registration 7

Returns a given setting by name.

2 calls to NodeRegistrationNodeSettings::setting()
NodeRegistrationNodeSettings::enabled in includes/node_registration.node_settings.inc
Whether this event's registration is enabled.
NodeRegistrationNodeSettings::__get in includes/node_registration.node_settings.inc
Fallback for missing settings: NULL instead of a PHP notice.

File

includes/node_registration.node_settings.inc, line 281
Node settings class.

Class

NodeRegistrationNodeSettings
Node settings class.

Code

public function setting($name, $alternative = NULL) {

  // Get setting from node settings.
  if (isset($this->{$name})) {
    return $this->{$name};
  }
  elseif (isset($this->node_type_settings->{$name})) {
    return $this->node_type_settings->{$name};
  }
  return $alternative;
}