Returns the default visibility.

@param string $type
The Group Type.

@return string|null
The default visibility.
506765
public static function getDefaultGroupVisibility($type) {
    $visibility = &drupal_static(__FUNCTION__ . $type);

    if (empty($visibility)) {
      switch ($type) {
        case 'closed_group':
          $visibility = 'group';
          break;

        case 'open_group':
          $visibility = 'community';
          break;

        case 'public_group':
          $visibility = 'public';
          break;

        default:
          $visibility = NULL;
      }

      \Drupal::moduleHandler()
        ->alter('social_group_default_visibility', $visibility, $type);
    }

    return $visibility;
  }
564352
public function message($type = null)
    {
        switch ($type) {
            case static::MESSAGE_HTML:
                return $this->_htmlMessage;
            case static::MESSAGE_TEXT:
                return $this->_textMessage;
        }

        return $this->_message;
    }
168549
protected function getPermissionField($type)
    {
        switch ($type) {
            case self::DELETE:
                // Delete uses edit type - Drop through
            case self::EDIT:
                return 'CanEditType';
            case self::VIEW:
                return 'CanViewType';
            default:
                throw new InvalidArgumentException("Invalid argument type $type");
        }
    }
439331
public static function convertToDisplayType(\ReflectionType $type)
    {
        static $typeMap = [
            'int'  => 'integer',
            'bool' => 'boolean'
        ];
        $displayType = (string)$type;
        if (isset($typeMap[$displayType])) {
            $displayType = $typeMap[$displayType];
        }

        $displayType = ltrim($displayType, '\\');

        if ($type->allowsNull()) {
            $displayType .= ' or NULL';
        }

        return $displayType;
    }
742221
public function getTypeName($type = null)
	{
		$group = $this->getGroup();
		$type  = $type === null ? $this->getType() : $type;

		return $GLOBALS['BOOTSTRAP']['wrappers'][$group][$type]['name'];
	}
116780
public function getTypeClass($type)
    {
        if (isset($this->types[$type])) {
            return $this->types[$type];
        }

        if (\class_exists($type)) {
            return $type;
        }

        return null;
    }
1362637
private function getTemplatePathDefault($type = 'layout')
    {
        $optionsRenderer = $this->getOptionsRenderer();
        if (isset($optionsRenderer['templates'][$type])) {
            return $optionsRenderer['templates'][$type];
        }

        if ('layout' === $type) {
            return 'zfc-datagrid/renderer/'.$this->getName().'/'.$type;
        } elseif ('toolbar' === $type) {
            return 'zfc-datagrid/toolbar/toolbar';
        }

        throw new \Exception('Unknown type: "'.$type.'"');
    }
1217310
public static function groupType($type)
    {
        if ($type == Teamspeak::GROUP_DBTYPE_TEMPLATE) {
            return "Template";
        }
        if ($type == Teamspeak::GROUP_DBTYPE_REGULAR) {
            return "Regular";
        }
        if ($type == Teamspeak::GROUP_DBTYPE_SERVERQUERY) {
            return "ServerQuery";
        }

        return "Unknown";
    }
780748
private function getAccessControlProvider($type)
    {
        foreach ($this->accessControlProviders as $accessControlProvider) {
            if ($accessControlProvider->supports($type)) {
                return $accessControlProvider;
            }
        }
    }
924726
public function getSubIfd($type)
    {
        if (isset($this->sub[$type])) {
            return $this->sub[$type];
        } else {
            return null;
        }
    }
326707
public function type($type = null)
    {
        if (!func_num_args()) {
            return $this->_type;
        }
        $this->_type = $type;
        return $this;
    }
1029683
public function getNextOfType($type)
    {
        for (; $this->idx < $this->count; ++$this->idx) {
            if ($this->tokens[$this->idx]->type === $type) {
                return $this->tokens[$this->idx++];
            }
        }

        return null;
    }
550828
public function get($type = FALSE)
  {
    $result = $this->peek($type);
	
    $this->clear($type);
	
    return $result;
  }
266343
public static function getVisibilityString($modifier)
	{
		if(is_string($modifier))
		{
			$modifier = self::getVisibilityModifier($modifier);
		}
		
		if($modifier & self::IS_PRIVATE)
		{
			return self::VISIBILITY_PRIVATE;
		}
		
		if($modifier & self::IS_PROTECTED)
		{
			return self::VISIBILITY_PROTECTED;
		}
		
		return self::VISIBILITY_PUBLIC;
	}
260648
public function getClassForType(string $type):?string
    {
        if (isset($this->typeMap[$type])) {
            return $this->typeMap[$type];
        }

        return null;
    }
923016
public static function get($type = null) {
        return is_null($type) ? self::$_messages : (isset(self::$_messages[$type]) ? self::$_messages[$type] : []);
    }
669864
public static function getResource(string $type)
    {
        if (isset(self::$resources[$type])) {
            return self::$resources[$type];
        }
        $class = '\\sdopx\\resource\\' . Utils::toCamel($type) . 'Resource';
        if (class_exists($class)) {
            self::$resources[$type] = new $class();
            return self::$resources[$type];
        }
        return null;
    }