Xpressengine\Editor\EditorHandler::getPermKey PHP Method

getPermKey() public method

Get a key string for the permission
public getPermKey ( string $instanceId ) : string
$instanceId string instance identifier
return string
    public function getPermKey($instanceId)
    {
        return $this->getConfigKey($instanceId);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Get dynamic option data for the editor
  *
  * @return array
  */
 protected function getDynamicOption()
 {
     $data = array_except($this->config->all(), 'tools');
     $data['fontFamily'] = isset($data['fontFamily']) ? array_map(function ($v) {
         return trim($v);
     }, explode(',', $data['fontFamily'])) : [];
     $data['extensions'] = isset($data['extensions']) ? array_map(function ($v) {
         return trim($v);
     }, explode(',', $data['extensions'])) : [];
     $data['extensions'] = array_search('*', $data['extensions']) !== false ? ['*'] : $data['extensions'];
     $instance = new Instance($this->editors->getPermKey($this->instanceId));
     $data['perms'] = ['html' => $this->gate->allows('html', $instance), 'tool' => $this->gate->allows('tool', $instance), 'upload' => $this->gate->allows('upload', $instance)];
     $data['files'] = $this->files;
     return $data;
 }
All Usage Examples Of Xpressengine\Editor\EditorHandler::getPermKey