Skip to content

Instantly share code, notes, and snippets.

<data>
<entry id="1">
<name>Woop woop</name>
</entry>
<entry id="2">
<name>Woop woop2</name>
</entry>
<entry id="3">
<name>Woop woop3</name>
</entry>
<data>
<gallery>
<pagination total-entries="13" total-pages="2" entries-per-page="12" current-page="1"/>
<section id="9" handle="gallery">Gallery</section>
<gallery-name handle="other" value="Other">
<entry id="219">
<gallery-name handle="other">Other</gallery-name>
<gallery/>
<pictures>
<item>
<?xml version="1.0" encoding="utf-8" ?>
<data>
<sponsorship-packages>
<section id="6" handle="sponsor-packages">Sponsor Packages</section>
<entry id="52">
<sponsor-categories>
<item id="45" handle="pocket-guide-sponsor" section-handle="sponsor-categories" section-name="Sponsor Categories">Pocket Guide Sponsor</item>
</sponsor-categories>
<maximum-number-of-delegates-per-package handle="1">1</maximum-number-of-delegates-per-package>
<number-of-delegates-per-package handle="2-delegate-passes">2 delegate passes</number-of-delegates-per-package>
@andrewminton
andrewminton / EventTutorial.md
Created December 4, 2012 18:35 — forked from brendo/EventTutorial.md
Symphony Events: A Detailed Look

Forms have been an integral part of any interactive site since the dawn of time, they promote interactivity and are usually the most common way users interact with a site. It's commonplace that when a form is submitted, the website will take 'action' and do something with the data and then provide a user with the result. Symphony provides this logic layer via Events.

This tutorial assumes you have a basic understanding of how Events work in Symphony (if not, this may be a good introduction) and are semi comfortable writing some PHP code. I'll be showing you some of the lesser known features of Symphony Events, including event priority, event chaining and a brief demonstration of how to write a custom Event. The difficulty level progresses as we go through, but with any luck you'll be able to learn a thing or two :)

Getting Started

The Scenario

Our client requires a form that allows a user to submit some details about their new car purchase. Th

<?php
class A {
private $foo="a";
protected $bar="a";
function getAstuff() {
return $this->foo.'/'.$this->bar;
}
}
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>Test fullscreen</title>
<style>
html, body {
margin: 0;
padding: 0;
<data>
<url-segments>
<segment>firstlink</segment>
<segment>2ndlink</segment>
<segment>thirdlink</segment>
<segment>4thlink</segment>
<segment>?poop=4thlink</segment>
</url-segments>
</data>
<data>
<params>
<workspace>http://192.168.1.4/symphony/workspace</workspace>
</params>
<images>
<section id="4" handle="images">Images</section>
<entry id="42">
<image-title handle="preview">Preview</image-title>
<image size="50 KB" path="/images/projektai" type="image/jpeg">
<filename>beute-beispielfoto-gruppe.jpg</filename>
<data>
<navigation>
<section id="1" handle="pages">Pages</section>
<entry id="1">
<title mode="formatted" word-count="1">Home</title>
<url-handle mode="formatted" handle="home" word-count="1">home</url-handle>
</entry>
<entry id="2">
<title mode="formatted" word-count="2">Sample Page</title>
<url-handle mode="formatted" handle="sample-page" word-count="1">sample-page</url-handle>
@andrewminton
andrewminton / nodetostring
Created September 6, 2013 16:00
Nodetostring test
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl">
<!--
Converts a nodeset to string, especially useful for json conversions.
===================================================================================