code: protected function supports($attribute, $subject)
      {
          if (!in_array($attribute, [Permission::BROWSE, Permission::READ, Permission::EDIT, Permission::ADD, Permission::DELETE, Permission::EXECUTE], true)) {
              return false;
          }
  
          if (!is_array($subject)) {
              return false;
          }
  
          if (2 !== count($subject)) {
              return false;
          }
  
          if (!array_key_exists(0, $subject)) {
              return false;
          }
  
          if (!is_object($subject[0])) {
              return false;
          }
  
          $class = get_class($subject[0]);
  
          if (!$this->entityCollection->contains($class)) {
              return false;
          }
  
          if (!array_key_exists(1, $subject)) {
              return false;
          }
  
          if (!is_string($subject[1])) {
              return false;
          }
  
          return true;
      }
docs: {@inheritdoc}