本文整理汇总了PHP中Concrete\Core\Block\BlockController类的典型用法代码示例。如果您正苦于以下问题:PHP BlockController类的具体用法?PHP BlockController怎么用?PHP BlockController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BlockController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deliverResponse
protected function deliverResponse(BlockController $controller, $action)
{
list($method, $parameters) = $controller->getPassThruActionAndParameters(array($action));
if ($controller->isValidControllerTask($method, $parameters)) {
$controller->on_start();
$response = $controller->runAction($method, $parameters);
if ($response instanceof \Symfony\Component\HttpFoundation\Response) {
return $response;
} else {
$r = new Response($response);
return $r;
}
}
$response = new Response(t('Access Denied'));
return $response;
}
示例2: save
public function save($args)
{
$args['enableFullWidth'] = isset($args['enableFullWidth']) ? 1 : 0;
$args['enableClear'] = isset($args['enableClear']) ? 1 : 0;
$args['enableSticky'] = isset($args['enableSticky']) ? 1 : 0;
parent::save($args);
}
示例3: save
public function save($args)
{
$db = Loader::db();
$cnvMessageID = $db->GetOne('select cnvMessageID from btCoreConversationMessage where bID = ?', array($this->bID));
if (!$cnvMessageID) {
$message = ConversationMessage::add(false, $args['cnvMessageSubject'], $args['cnvMessageBody']);
if (!Loader::helper('validation/antispam')->check($args['cnvMessageBody'], 'conversation_comment')) {
$message->flag(ConversationFlagType::getByHandle('spam'));
} else {
$message->approve();
}
$data = array();
$data['cnvMessageID'] = $message->getConversationMessageID();
parent::save($data);
// update any conversation blocks on that page to have their conversations reflect that this is a base message block.
// we will then use that to group and show replies and messages in the dashboard
$b = $this->getBlockObject();
$c = $b->getBlockCollectionObject();
$blocks = $c->getBlocks();
foreach ($blocks as $b) {
if ($b->getBlockTypeHandle() == BLOCK_HANDLE_CONVERSATION) {
$bi = $b->getController();
$conversation = $bi->getConversationObject();
$conversation->setConversationParentMessageID($message->getConversationMessageID());
}
}
}
}
示例4: save
public function save($args)
{
$args += array('showArrows' => 0, 'loopSequence' => 0);
$args['showArrows'] = intval($args['showArrows']);
$args['loopSequence'] = intval($args['loopSequence']);
parent::save($args);
}
示例5: save
public function save($data)
{
$args['content'] = isset($data['content']) ? $data['content'] : '';
$args['language'] = isset($data['language']) ? $data['language'] : '';
$args['theme'] = isset($data['theme']) ? $data['theme'] : '';
parent::save($args);
}
示例6: save
public function save($args)
{
$args['mautic_base_url'] = isset($args['mautic_base_url']) ? $args['mautic_base_url'] : '';
// Sanitize URL
$args['mautic_base_url'] = trim($args['mautic_base_url'], ' \\t\\n\\r\\0\\x0B/');
parent::save($args);
}
示例7: delete
public function delete()
{
$db = Database::connection();
$params = array($this->bID);
$query = "DELETE FROM btTextListEntries WHERE bID = ?";
$db->query($query, $params);
parent::delete();
}
示例8: save
public function save($args)
{
if ($args['table_data'] == '[[null],[null]]' || $args['table_data'] == '[[null]]') {
$args['table_data'] = '';
$args['table_metadata'] = '';
}
parent::save($args);
}
示例9: save
public function save($args)
{
$args['do_crop'] = $args['do_crop'] ? true : false;
// Due to a bug in the core, we can't save null values yet...
$args['max_width'] = !empty($args['max_width']) ? $args['max_width'] : 0;
$args['max_height'] = !empty($args['max_height']) ? $args['max_height'] : 0;
parent::save($args);
}
示例10: save
public function save($data)
{
if (isset($data['host'])) {
$url = Url::createFromUrl($data['host']);
$host = $url->getHost();
$data['host'] = (string) $host;
}
parent::save($data);
}
示例11: save
public function save($args)
{
$args['showCartItems'] = isset($args['showCartItems']) ? 1 : 0;
$args['showCartTotal'] = isset($args['showCartTotal']) ? 1 : 0;
$args['showSignIn'] = isset($args['showSignIn']) ? 1 : 0;
$args['showCheckout'] = isset($args['showCheckout']) ? 1 : 0;
$args['showGreeting'] = isset($args['showGreeting']) ? 1 : 0;
parent::save($args);
}
示例12: save
public function save($args)
{
$args['mautic_base_url'] = isset($args['mautic_base_url']) ? $args['mautic_base_url'] : '';
// Sanitize URL
$args['mautic_base_url'] = trim($args['mautic_base_url']);
$args['mautic_base_url'] = rtrim($args['mautic_base_url'], '/');
$args['mautic_base_url'] = ltrim($args['mautic_base_url'], 'https:');
parent::save($args);
}
示例13: save
public function save($data)
{
$data['useCustomTitle'] = isset($data['useCustomTitle']) && $data['useCustomTitle'] ? 1 : 0;
$data['useFilterTitle'] = isset($data['useFilterTitle']) && $data['useFilterTitle'] ? 1 : 0;
$data['useFilterTopic'] = isset($data['useFilterTopic']) && $data['useFilterTopic'] ? 1 : 0;
$data['useFilterTag'] = isset($data['useFilterTag']) && $data['useFilterTag'] ? 1 : 0;
$data['useFilterDate'] = isset($data['useFilterDate']) && $data['useFilterDate'] ? 1 : 0;
parent::save($data);
}
示例14: save
public function save($args)
{
$args['showQuickViewLink'] = isset($args['showQuickViewLink']) ? 1 : 0;
$args['showPageLink'] = isset($args['showPageLink']) ? 1 : 0;
$args['showAddToCart'] = isset($args['showAddToCart']) ? 1 : 0;
$args['showLink'] = isset($args['showLink']) ? 1 : 0;
$args['showButton'] = isset($args['showButton']) ? 1 : 0;
$args['truncateEnabled'] = isset($args['truncateEnabled']) ? 1 : 0;
$args['showPagination'] = isset($args['showPagination']) ? 1 : 0;
parent::save($args);
}
示例15: save
function save($args)
{
$args['numberFiles'] = $args['numberFiles'] > 0 ? $args['numberFiles'] : 0;
$args['displaySetTitle'] = $args['displaySetTitle'] ? '1' : '0';
$args['replaceUnderscores'] = $args['replaceUnderscores'] ? '1' : '0';
$args['displaySize'] = $args['displaySize'] ? '1' : '0';
$args['displayDateAdded'] = $args['displayDateAdded'] ? '1' : '0';
$args['uppercaseFirst'] = $args['uppercaseFirst'] ? '1' : '0';
$args['paginate'] = $args['paginate'] ? '1' : '0';
$args['forceDownload'] = $args['forceDownload'] ? '1' : '0';
parent::save($args);
}