本文整理汇总了PHP中Dashboard::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Dashboard::getName方法的具体用法?PHP Dashboard::getName怎么用?PHP Dashboard::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dashboard
的用法示例。
在下文中一共展示了Dashboard::getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catch
fURL::redirect(Dashboard::makeURL('edit', $dashboard));
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
}
include VIEW_PATH . '/add_edit_dashboard.php';
} elseif ('clone_into' == $action) {
if (fRequest::isPost()) {
$graph_to_clone = new Graph($graph_id);
$dashboard = new Dashboard($dashboard_dest_id);
try {
fRequest::validateCSRFToken(fRequest::get('token'));
Graph::cloneGraph($graph_id, $dashboard_dest_id);
$url_redirect = Dashboard::makeURL('list');
fMessaging::create('affected', $url_redirect, $graph_to_clone->getName());
fMessaging::create('success', "/" . $url_redirect, 'The Graph "' . $graph_to_clone->getName() . '" was successfully cloned into the Dashboard "' . $dashboard->getName() . '"');
fURL::redirect($url_redirect);
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
}
include VIEW_PATH . '/list_dashboards.php';
} elseif ('reorder' == $action) {
$drag_order = fRequest::get('drag_order');
$error = false;
if (empty($drag_order)) {
// In this case, the user clicks on the arrow
$move = fRequest::getValid('move', array('previous', 'next'));
$graph_to_move = new Graph($graph_id);
$dashboard_id = $graph_to_move->getDashboardId();
$graphs_in_dashboard = Graph::findAll($dashboard_id);
示例2: array
$quick_sizes_desired = array("100 x 50" => array("width" => "100", "height" => "50"), "300 x 150" => array("width" => "300", "height" => "150"), "600 x 300" => array("width" => "600", "height" => "300"), "900 x 450" => array("width" => "900", "height" => "450"));
$display_options_links = fRequest::get('display_options_links', 'integer');
if (empty($display_options_links) || $display_options_links > 3 || $display_options_links < 0) {
// The only possibles values are 0 to 3
// 0 -> Nothing displayed
// 1 -> Only options are displayed
// 2 -> Only links are displayed
// 3 -> Both are displayed
$display_options_links = 0;
}
include VIEW_PATH . '/view_dashboard.php';
} elseif ('delete' == $action) {
$class_name = 'Dashboard';
try {
$obj = new Dashboard($dashboard_id);
$delete_text = 'Are you sure you want to delete dashboard : <strong>' . $obj->getName() . '</strong>?';
if (fRequest::isPost()) {
fRequest::validateCSRFToken(fRequest::get('token'));
$obj->delete();
$graphs = Graph::findAll($dashboard_id);
// Do Dashboard Subelement Cleanup
foreach ($graphs as $graph) {
$lines = Line::findAll($graph->getGraphId());
foreach ($lines as $line) {
$line->delete();
}
$graph->delete();
}
fMessaging::create('success', Dashboard::makeUrl('list'), 'The Dashboard ' . $obj->getName() . ' was successfully deleted');
fURL::redirect(Dashboard::makeUrl('list'));
}
示例3: catch
} catch (fNotFoundException $e) {
fMessaging::create('error', Dashboard::makeUrl('list'), 'The Dashboard requested ' . fHTML::encode($dashboard_id) . 'could not be found');
fURL::redirect(Dashboard::makeUrl('list'));
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
include VIEW_PATH . '/add_edit_dashboard.php';
// --------------------------------- //
} elseif ('add' == $action) {
$dashboard = new Dashboard();
if (fRequest::isPost()) {
try {
$dashboard->populate();
fRequest::validateCSRFToken(fRequest::get('token'));
$dashboard->store();
fMessaging::create('affected', fURL::get(), $dashboard->getName());
fMessaging::create('success', fURL::get(), 'The Dashboard ' . $dashboard->getName() . ' was successfully created');
fURL::redirect(Dashboard::makeURL('edit', $dashboard));
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
}
include VIEW_PATH . '/add_edit_dashboard.php';
} elseif ('view' == $action) {
$dashboard = new Dashboard($dashboard_id);
$graphs = Graph::findAll($dashboard_id);
include VIEW_PATH . '/view_dashboard.php';
} else {
$dashboards = Dashboard::findAll();
include VIEW_PATH . '/list_dashboards.php';
}