[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Console/ -> AddUserToGroupCommand.php (summary)

Joomla! Content Management System

Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 308 lines (8 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class

AddUserToGroupCommand:: (8 methods):
  __construct()
  doExecute()
  getGroups()
  getGroupId()
  getUserId()
  getStringFromOption()
  configureIO()
  configure()


Class: AddUserToGroupCommand  - X-Ref

Console command to add a user to group

__construct(DatabaseInterface $db)   X-Ref
Command constructor.

param: DatabaseInterface  $db  The database

doExecute(InputInterface $input, OutputInterface $output)   X-Ref
Internal function to execute the command.

param: InputInterface   $input   The input to inject into the command.
param: OutputInterface  $output  The output to inject into the command.
return: integer  The command exit code

getGroups($user)   X-Ref
Method to get a value from option

param: User  $user  a UserInstance
return: array

getGroupId($groupName)   X-Ref
Method to get groupId by groupName

param: string  $groupName  name of group
return: integer

getUserId($username)   X-Ref
Method to get a user object

param: string  $username  username
return: object

getStringFromOption($option, $question)   X-Ref
Method to get a value from option

param: string  $option    set the option name
param: string  $question  set the question if user enters no value to option
return: string

configureIO(InputInterface $input, OutputInterface $output)   X-Ref
Configure the IO.

param: InputInterface   $input   The input to inject into the command.
param: OutputInterface  $output  The output to inject into the command.
return: void

configure()   X-Ref
Configure the command.

return: void



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer