Backend\Modules\Profiles\Actions\Groups::parseNumProfiles PHP Метод

parseNumProfiles() публичный статический Метод

Parse amount of profiles for the datagrid.
public static parseNumProfiles ( integer $groupId, integer $numProfiles ) : string
$groupId integer Group id.
$numProfiles integer Number of profiles.
Результат string
    public static function parseNumProfiles($groupId, $numProfiles)
    {
        // 1 item
        if ($numProfiles == 1) {
            $output = '1 ' . BL::getLabel('Profile');
        } else {
            // no items
            $output = $numProfiles . ' ' . BL::getLabel('Profiles');
        }
        // check if this action is allowed
        if (BackendAuthentication::isAllowedAction('Edit')) {
            // complete output
            $output = '<a href="' . BackendModel::createURLForAction('Index') . '&amp;group=' . $groupId . '" title="' . $output . '">' . $output . '</a>';
        }
        return $output;
    }