code: public function getFieldFlags($field)
      {
          if (!$this->hasField($field)) {
              return [];
          }
  
          if (!isset($this->fields[$field]['__flags__'])) {
              $this->fields[$field]['__flags__'] = $this->copyArrayValues(
                  $this->fields[$field],
                  [
                      'flags' => [],
                      'order' => ['priority'],
                      'priority'
                  ]
              );
          }
  
          return $this->fields[$field]['__flags__'];
      }
docs: Get the field flags array compatible with element flags.
  
  @param string $field
  
  @return array