method nativeOption documentation in bbn\Appui\Option
Returns an option's row as stored in its original form in the database
Example
X::dump($opt->nativeOption(25));
/*
array [
'id' => 25,
'code' => "bbn_ide",
'text' => "BBN's own IDE",
'id_alias' => null,
'value' => "{\"myProperty\":\"My property's value\"}"
]
function($code = NULL)
{
if (bbn\Str::isUid($id = $this->fromCode(\func_get_args()))) {
if ($opt = $this->cacheGet($id, __FUNCTION__)) {
return $opt;
}
$tab = $this->db->tsn($this->class_cfg['table']);
$cfn = $this->db->cfn($this->fields['id'], $tab);
$opt = $this->getRow([$cfn => $id]);
if ($opt) {
$this->cacheSet($id, __FUNCTION__, $opt);
return $opt;
}
}
return null;
}
Returns an option's row as stored in its original form in the database BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions