method customize documentation in bbn\User\Permissions

Adapts a given array of options' to user's permissions

function(array $arr) { $res = []; if (isset($arr[0])) { foreach ($arr as $a){ if (isset($a['id']) && $this->has($a['id'])) { $res[] = $a; } } } elseif (isset($arr['items'])) { $res = $arr; unset($res['items']); foreach ($arr['items'] as $a){ if (isset($a['id']) && $this->has($a['id'])) { if (!isset($res['items'])) { $res['items'] = []; } $res['items'][] = $a; } } } return $res; }

Adapts a given array of options' to user's permissions 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.