Example #1
0
 public function __toString()
 {
     $data = array();
     $data['message'] = $this->message;
     $data['header'] = $this->header;
     return AMDisplayObject::renderDisplayObjectWithURLAndDictionary('views/subheading.html', $data);
 }
Example #2
0
 protected function prepareMessage()
 {
     $dictionary = $this->dictionary();
     $text = AMDisplayObject::initWithURLAndDictionary($this->basePath() . '/' . $this->text, $dictionary);
     $html = AMDisplayObject::initWithURLAndDictionary($this->basePath() . '/' . $this->html, $dictionary);
     return array('text' => $text->__toString(), 'html' => $html->__toString());
 }
Example #3
0
 public function __toString()
 {
     if ($this->isAuthorized) {
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/SettingsFacebookAuthorized.html');
     } else {
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/SettingsFacebook.html', $dictionary);
     }
 }
Example #4
0
 public function __toString()
 {
     $source = $_SERVER['DOCUMENT_ROOT'] . '/application/controls/ApplicationDetail.html';
     list($user, $name) = explode('/', $this->data['_id']);
     $this->data['name'] = $name;
     $this->data['private'] = $this->data['private'] ? 'Yes' : 'No';
     return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($source, $this->data);
 }
Example #5
0
 public function __toString()
 {
     if (Application::current_user()) {
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/Header_Authorized.html');
     } else {
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/Header.html');
     }
 }
Example #6
0
 public function __toString()
 {
     if ($this->isAuthorized) {
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/SettingsTwitterAuthorized.html');
     } else {
         $dictionary = array("url" => $this->authorization_url);
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/SettingsTwitter.html', $dictionary);
     }
 }
Example #7
0
 protected function page_load($argc = 0, $argv = null)
 {
     $dir = dirname(__FILE__);
     $options = array();
     $navigation = null;
     $source = Renegade::hasAuthorizedUser() ? $dir . '/NavigationAuthorizedTrue.html' : $dir . '/NavigationAuthorizedFalse.html';
     $navigation = AMDisplayObject::initWithURLAndDictionary($source, $options);
     echo $navigation;
 }
 public function __toString()
 {
     $data = array();
     $data['cta_home'] = 'Home';
     $data['cta_about'] = 'About';
     $data['cta_contact'] = 'Contact';
     $data['message'] = $this->message;
     return AMDisplayObject::renderDisplayObjectWithURLAndDictionary('views/template.html', $data);
 }
 public function __toString()
 {
     $source = $_SERVER['DOCUMENT_ROOT'] . '/application/controls/SubscriptionDetail.html';
     $this->data['permission_read'] = RenegadeConstants::kPermissionRead;
     $this->data['permission_write'] = RenegadeConstants::kPermissionWrite;
     $this->data['permission_delete'] = RenegadeConstants::kPermissionDelete;
     $this->data['has_read'] = $this->data['permissions'] & RenegadeConstants::kPermissionRead ? 'checked' : '';
     $this->data['has_write'] = $this->data['permissions'] & RenegadeConstants::kPermissionWrite ? 'checked' : '';
     $this->data['has_delete'] = $this->data['permissions'] & RenegadeConstants::kPermissionDelete ? 'checked' : '';
     $this->data['action'] = $_SERVER['REDIRECT_URL'];
     return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($source, $this->data);
 }
Example #10
0
 public function render()
 {
     if ($this->source) {
         $output = $this->source;
         foreach ($this->dictionary as $key => $value) {
             $this->applyPropertyToView($key, $value, $output);
         }
         return $output;
     } else {
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($this->url, $this->dictionary);
     }
 }
Example #11
0
 public function __toString()
 {
     switch ($this->context) {
         case ChannelDetail::kContextDefault:
             $source = $_SERVER['DOCUMENT_ROOT'] . '/application/controls/ChannelDetail.html';
             break;
         case ChannelDetail::kContextSubscription:
             $source = $_SERVER['DOCUMENT_ROOT'] . '/application/controls/ChannelDetailSubscription.html';
             break;
     }
     return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($source, $this->data);
 }
Example #12
0
 public function __toString()
 {
     $dictionary = array('message' => $this->message);
     return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/ErrorMessage.html', $dictionary);
 }
 *    PURPOSE. See the License for the specific language governing permissions and
 *    limitations under the License.
 *
 *    Author: Adam Venturella - aventurella@gmail.com
 *
 *    @package samples
 *    @subpackage display
 *    @author Adam Venturella <*****@*****.**>
 *    @copyright Copyright (C) 2010 Adam Venturella
 *    @license http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0
 *
 **/
require '../../axismundi/display/AMDisplayObject.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>DisplayObject Simple</title>
	<meta name="author" content="Adam Venturella">
</head>
<body>
	<?php 
$dictionary = array('message' => 'Welcome', 'cta_home' => 'Home', 'cta_about' => 'About', 'cta_contact' => 'Contact');
echo AMDisplayObject::initWithURLAndDictionary('views/template.html', $dictionary);
?>
</body>
</html>
Example #14
0
 public function __toString()
 {
     return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/ChannelView.html', $this->dictionary);
 }