PHP 클래스 Elgg\SystemMessagesService

Use the elgg_* versions instead.
부터: 1.11.0
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$session ElggSession

공개 메소드들

메소드 설명
__construct ( ElggSession $session ) Constructor
addErrorMessage ( string | string[] $error ) : void Display an error on next page load.
addSuccessMessage ( string | string[] $message ) : void Display a system message on next page load.
count ( string $register_name = "" ) : integer Counts the number of messages, either globally or in a particular register
dumpRegister ( string $register_name = '' ) : array Empty and return the given register or all registers. In each case, the return value is a filtered version of the full registers array.
loadRegisters ( ) : RegisterSet Load the registers from the session
saveRegisters ( RegisterSet $set ) : void Save the registers to the session

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( ElggSession $session )
$session ElggSession The Elgg session

addErrorMessage() 공개 메소드

Display an error on next page load.
public addErrorMessage ( string | string[] $error ) : void
$error string | string[] Error or errors to add
리턴 void

addSuccessMessage() 공개 메소드

Display a system message on next page load.
public addSuccessMessage ( string | string[] $message ) : void
$message string | string[] Message or messages to add
리턴 void

count() 공개 메소드

Counts the number of messages, either globally or in a particular register
public count ( string $register_name = "" ) : integer
$register_name string Optionally, the register
리턴 integer The number of messages

dumpRegister() 공개 메소드

Empty and return the given register or all registers. In each case, the return value is a filtered version of the full registers array.
public dumpRegister ( string $register_name = '' ) : array
$register_name string The register. Empty string for all.
리턴 array The array of registers dumped

loadRegisters() 공개 메소드

Load the registers from the session
public loadRegisters ( ) : RegisterSet
리턴 Elgg\SystemMessages\RegisterSet

saveRegisters() 공개 메소드

The method of displaying these messages differs depending upon plugins and viewtypes. The core default viewtype retrieves messages in {@link views/default/page/shells/default.php} and displays messages as javascript popups. Messages are stored as strings in the Elgg session as ['msg'][$register] array.
public saveRegisters ( RegisterSet $set ) : void
$set Elgg\SystemMessages\RegisterSet The set of registers
리턴 void

프로퍼티 상세

$session 보호되어 있는 프로퍼티

protected ElggSession $session
리턴 ElggSession