コード例 #1
0
 public function executeRedirect()
 {
     $aEvent = $this->getRoute()->getObject();
     aRouteTools::pushTargetEnginePage($aEvent->findBestEngine());
     $url = $this->generateUrl('a_event_post', $aEvent);
     $this->redirect($url);
 }
コード例 #2
0
ファイル: aRoute.php プロジェクト: quafzi/timpany-prototype
 /**
  * Generates a URL from the given parameters.
  *
  * @param  mixed   $params    The parameter values
  * @param  array   $context   The context
  * @param  Boolean $absolute  Whether to generate an absolute URL
  *
  * @return string The generated URL
  */
 public function generate($params, $context = array(), $absolute = false)
 {
     $slug = null;
     if (isset($params['engine-slug'])) {
         $slug = $params['engine-slug'];
         aRouteTools::pushTargetEnginePage($slug);
         unset($params['engine-slug']);
     }
     // Note that you must pass false to parent::generate for the $absolute parameter
     $result = aRouteTools::addPageToUrl($this, parent::generate($params, $context, false), $absolute);
     if ($slug) {
         aRouteTools::popTargetEnginePage($slug);
     }
     return $result;
 }
コード例 #3
0
 public function executeRedirect()
 {
     $aBlogPost = $this->getRoute()->getObject();
     aRouteTools::pushTargetEnginePage($aBlogPost->findBestEngine());
     $this->redirect($this->generateUrl('a_blog_post', $this->getRoute()->getObject()));
 }
コード例 #4
0
ファイル: _form.php プロジェクト: hashir/UoA
		<?php 
echo $form['tags']->renderError();
?>
		<?php 
a_js_call('pkInlineTaggableWidget(?, ?)', '#a-blog-post-tags-input', array('popular-tags' => $popularTags, 'existing-tags' => $existingTags, 'typeahead-url' => url_for('taggableComplete/complete'), 'tags-label' => ' '));
?>
		</div>
	</div>

	<hr class="a-hr" />
	<div class="delete preview section a-form-row">
		<?php 
$engine = $a_event->findBestEngine();
?>
	  <?php 
aRouteTools::pushTargetEnginePage($engine);
?>
		<?php 
echo link_to('<span class="icon"></span>' . a_('Preview'), 'a_blog_post', array('preview' => 1) + $a_event->getRoutingParams(), array('class' => 'a-btn icon a-search lite a-align-left', 'rel' => 'external'));
?>
	  <?php 
aRouteTools::popTargetEnginePage($engine->engine);
?>
	  <?php 
if ($a_event->userHasPrivilege('delete')) {
    ?>
		  <?php 
    echo link_to('<span class="icon"></span>' . a_('Delete'), 'a_event_admin_delete', $a_event, array('class' => 'a-btn icon a-delete alt lite a-align-right', 'method' => 'delete', 'confirm' => a_('Are you sure you want to delete this event?')));
    ?>
	  <?php 
}
コード例 #5
0
        ?>
					<li><a href="#" class="a-btn icon a-page-small" onclick="return false;" id="a-this-page-toggle"><?php 
        echo __('This Page', null, 'apostrophe');
        ?>
</a></li>
				<?php 
    }
    ?>
  			<?php 
    foreach ($buttons as $button) {
        ?>
  			  <?php 
        if ($button->getTargetEnginePage()) {
            ?>
  			    <?php 
            aRouteTools::pushTargetEnginePage($button->getTargetEnginePage());
            ?>
  			  <?php 
        }
        ?>
  			  <li><?php 
        echo link_to(__($button->getLabel(), null, 'apostrophe'), $button->getLink(), array('class' => 'a-btn icon ' . $button->getCssClass()));
        ?>
</li>
  			<?php 
    }
    ?>
  		</ul>
  	</div>

  	<div class="a-global-toolbar-user-settings a-personal-settings-container">
コード例 #6
0
ファイル: _addThis.php プロジェクト: quafzi/timpany-prototype
<?php

if ($addthis_username = sfConfig::get('app_aBlog_add_this')) {
    ?>
	<!-- AddThis Button BEGIN -->
  <?php 
    aRouteTools::pushTargetEnginePage($aEvent->findBestEngine());
    ?>
	<div class="addthis_toolbox addthis_default_style">
		<a href="http://addthis.com/bookmark.php?v=250&amp;username=<?php 
    echo $addthis_username;
    ?>
" class="addthis_button_compact"
			addthis:url="<?php 
    echo url_for('a_event', $aEvent, true);
    ?>
"
			addthis:title="<?php 
    echo $aEvent['title'];
    ?>
">Share</a>
		<span class="addthis_separator">|</span>
		<a class="addthis_button_facebook"></a>
		<a class="addthis_button_myspace"></a>
		<a class="addthis_button_google"></a>
		<a class="addthis_button_twitter"></a>
	</div>
  <?php 
    aRouteTools::popTargetEnginePage('aEvent');
    ?>
	<!-- AddThis Button END -->	
コード例 #7
0
ファイル: _choose.php プロジェクト: verenate/gri
<?php

// Make sure we target the administrative media engine page and not a public instance
aRouteTools::pushTargetEnginePage('/admin/media');
$after = url_for($action) . "?" . http_build_query(array("slot" => $name, "slug" => $slug, "actual_slug" => aTools::getRealPage()->getSlug(), "permid" => $permid, "noajax" => 1));
echo link_to($buttonLabel, 'aMedia/select', array('query_string' => http_build_query(array_merge($constraints, array("aMediaId" => $itemId, "type" => $type, "label" => $label, "after" => $after))), 'class' => $class));
aRouteTools::popTargetEnginePage('aMedia');
コード例 #8
0
ファイル: _addThis.php プロジェクト: quafzi/timpany-prototype
<?php

if ($addthis_username = sfConfig::get('app_aBlog_add_this')) {
    ?>
	<!-- AddThis Button BEGIN -->
  <?php 
    aRouteTools::pushTargetEnginePage($aBlogPost->findBestEngine());
    ?>
	<div class="addthis_toolbox addthis_default_style">
		<a href="http://addthis.com/bookmark.php?v=250&amp;username=<?php 
    echo $addthis_username;
    ?>
" class="addthis_button_compact"
			addthis:url="<?php 
    echo url_for('a_blog_post', $aBlogPost, true);
    ?>
"
			addthis:title="<?php 
    echo $aBlogPost['title'];
    ?>
">Share</a>
		<span class="addthis_separator">|</span>
		<a class="addthis_button_facebook"></a>
		<a class="addthis_button_myspace"></a>
		<a class="addthis_button_google"></a>
		<a class="addthis_button_twitter"></a>
	</div>
  <?php 
    aRouteTools::popTargetEnginePage('aBlog');
    ?>
	<!-- AddThis Button END -->