PHP 클래스 Scalr_UI_Controller_Announcements

상속: extends Scalr_UI_Controller
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 메소드들

메소드 설명
defaultAction ( )
hasAccess ( )
viewAction ( )
xListAction ( JsonData $sort, string $query = null, integer $start, integer $limit = 25 )
xListAnnouncementsAction ( ) : array Get announcements for dashboard Announcement and popup What's new in Scalr
xRemoveAction ( JsonData $ids )
xSaveAction ( string $msg, string $title, integer $id = null ) Add or update announcement message
xSetTmAction ( integer $tm ) If session is not virtual, - sets UserSetting::NAME_UI_ANNOUNCEMENT_TIME

비공개 메소드들

메소드 설명
dbAnnouncements ( $type, $params ) : array Get announcements from DB ordered by added desc
getRssFeedXml ( string $url ) : SimpleXMLElement | false Get RSS feed content
prepareDataForDashboard ( Announcement $announcement ) : array Transform entity of type MESSAGE for client-side (dashboard, popup)
prepareDataForList ( Announcement $announcement ) : array Transform entity of type MESSAGE for client-side (view, edit)
rssAnnouncements ( $type, $params ) : array Get announcements from rss feed or from rss cache if any

메소드 상세

defaultAction() 공개 메소드

public defaultAction ( )

hasAccess() 공개 메소드

public hasAccess ( )

viewAction() 공개 메소드

public viewAction ( )

xListAction() 공개 메소드

public xListAction ( JsonData $sort, string $query = null, integer $start, integer $limit = 25 )
$sort Scalr\UI\Request\JsonData Sorting order, defaults to added desc
$query string optional If set search in fields `id` (exact match), `title`, `msg` (partial match)
$start integer optional Offset
$limit integer optional Limit

xListAnnouncementsAction() 공개 메소드

Get announcements for dashboard Announcement and popup What's new in Scalr
public xListAnnouncementsAction ( ) : array
리턴 array

xRemoveAction() 공개 메소드

public xRemoveAction ( JsonData $ids )
$ids Scalr\UI\Request\JsonData Array of announcements' ids to remove

xSaveAction() 공개 메소드

Add or update announcement message
public xSaveAction ( string $msg, string $title, integer $id = null )
$msg string Announcement's text
$title string Announcement's title
$id integer optional Announcement's ID

xSetTmAction() 공개 메소드

If session is not virtual, - sets UserSetting::NAME_UI_ANNOUNCEMENT_TIME
public xSetTmAction ( integer $tm )
$tm integer Unix timestamp