Browse Source

- Rename WidgetLoad() to load() in all the project

pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
80d9cfe09b
  1. 8
      app/assets/documents/movim.texi
  2. 2
      app/widgets/About/About.php
  3. 2
      app/widgets/Account/Account.php
  4. 2
      app/widgets/AccountError/AccountError.php
  5. 2
      app/widgets/AccountNext/AccountNext.php
  6. 2
      app/widgets/Ack/Ack.php
  7. 2
      app/widgets/Admin/Admin.php
  8. 2
      app/widgets/AdminLogin/AdminLogin.php
  9. 2
      app/widgets/Avatar/Avatar.php
  10. 2
      app/widgets/Blog/Blog.php
  11. 2
      app/widgets/Bookmark/Bookmark.php
  12. 2
      app/widgets/Chat/Chat.php
  13. 2
      app/widgets/Config/Config.php
  14. 2
      app/widgets/ConfigData/ConfigData.php
  15. 2
      app/widgets/Connection/Connection.php
  16. 2
      app/widgets/ContactCard/ContactCard.php
  17. 2
      app/widgets/ContactInfo/ContactInfo.php
  18. 2
      app/widgets/ContactManage/ContactManage.php
  19. 2
      app/widgets/ContactPubsubSubscription/ContactPubsubSubscription.php
  20. 2
      app/widgets/ContactSummary/ContactSummary.php
  21. 2
      app/widgets/Discover/Discover.php
  22. 2
      app/widgets/Explore/Explore.php
  23. 2
      app/widgets/Feed/Feed.php
  24. 2
      app/widgets/Help/Help.php
  25. 2
      app/widgets/Location/Location.php
  26. 2
      app/widgets/Login/Login.php
  27. 2
      app/widgets/Media/Media.php
  28. 2
      app/widgets/MediaUpload/MediaUpload.php
  29. 2
      app/widgets/News/News.php
  30. 2
      app/widgets/Node/Node.php
  31. 2
      app/widgets/NodeAffiliations/NodeAffiliations.php
  32. 2
      app/widgets/NodeConfig/NodeConfig.php
  33. 2
      app/widgets/NodeSubscriptions/NodeSubscriptions.php
  34. 2
      app/widgets/Notification/Notification.php
  35. 2
      app/widgets/Notifs/Notifs.php
  36. 2
      app/widgets/Poller/Poller.php
  37. 2
      app/widgets/Presence/Presence.php
  38. 2
      app/widgets/Profile/Profile.php
  39. 2
      app/widgets/PubsubSubscriptionConfig/PubsubSubscriptionConfig.php
  40. 2
      app/widgets/Roster/Roster.php
  41. 2
      app/widgets/ServerNodes/ServerNodes.php
  42. 2
      app/widgets/Subscribe/Subscribe.php
  43. 2
      app/widgets/Syndication/Syndication.php
  44. 2
      app/widgets/System/System.php
  45. 2
      app/widgets/Tabs/Tabs.php
  46. 2
      app/widgets/Vcard/Vcard.php
  47. 2
      app/widgets/Vcard4/Vcard4.php
  48. 2
      app/widgets/Visio/Visio.php
  49. 2
      app/widgets/VisioExt/VisioExt.php
  50. 2
      app/widgets/Wall/Wall.php
  51. 4
      system/widget/WidgetBase.php

8
app/assets/documents/movim.texi

@ -171,7 +171,7 @@ The basic template of a Movim widget is as follows:
@verbatim
class MyWidget extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('incomemessage', 'onIncomingMessage');
}
@ -195,10 +195,10 @@ class MyWidget extends WidgetBase
@end cartouche
Note that the constructor must not be shadowed. Instead the parent class
provides a @code{WidgetLoad()} function that is called right at the end of the
provides a @code{load()} function that is called right at the end of the
parent constructor.
Event handlers must be defined into @code{WidgetLoad()}.
Event handlers must be defined into @code{load()}.
The @code{build()} function is called when the widget is being written onto the
interface. That's typically where you should put your HTML code.
@ -214,7 +214,7 @@ An event handler is a public method that only takes one parameter:
@code{$data}, which usually is an array that contains the data returned by the
XMPP server.
Your handlers must be registered in @code{WidgetLoad()} using the method:
Your handlers must be registered in @code{load()} using the method:
@cartouche
@verbatim

2
app/widgets/About/About.php

@ -20,6 +20,6 @@
class About extends WidgetBase
{
function WidgetLoad() {
function load() {
}
}

2
app/widgets/Account/Account.php

@ -20,7 +20,7 @@
class Account extends WidgetBase {
function WidgetLoad()
function load()
{
$this->addcss('account.css');
$this->addjs('account.js');

2
app/widgets/AccountError/AccountError.php

@ -20,7 +20,7 @@
class AccountError extends WidgetBase {
function WidgetLoad()
function load()
{
$warning = '';

2
app/widgets/AccountNext/AccountNext.php

@ -20,7 +20,7 @@
class AccountNext extends WidgetBase {
function WidgetLoad()
function load()
{
$this->addcss('accountnext.css');
$this->addjs('accountnext.js');

2
app/widgets/Ack/Ack.php

@ -18,7 +18,7 @@
*/
class Ack extends WidgetBase {
function WidgetLoad()
function load()
{
$this->registerEvent('ack', 'onAckRequest');

2
app/widgets/Admin/Admin.php

@ -22,7 +22,7 @@ class Admin extends WidgetBase {
private $_conf;
private $_validatebutton;
function WidgetLoad()
function load()
{
$this->addjs('admin.js');
$this->_conf = \system\Conf::getServerConf();

2
app/widgets/AdminLogin/AdminLogin.php

@ -16,7 +16,7 @@
*/
class AdminLogin extends WidgetBase {
function WidgetLoad()
function load()
{

2
app/widgets/Avatar/Avatar.php

@ -17,7 +17,7 @@
class Avatar extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('myavatarvalid', 'onAvatarPublished');
$this->registerEvent('myavatarinvalid', 'onAvatarNotPublished');

2
app/widgets/Blog/Blog.php

@ -1,7 +1,7 @@
<?php
class Blog extends WidgetCommon {
function WidgetLoad()
function load()
{
$from = $_GET['f'];
$node = $_GET['n'];

2
app/widgets/Bookmark/Bookmark.php

@ -22,7 +22,7 @@ class Bookmark extends WidgetBase
{
private $_list_server;
function WidgetLoad()
function load()
{
$this->addcss('bookmark.css');
$this->registerEvent('bookmark', 'onBookmark');

2
app/widgets/Chat/Chat.php

@ -20,7 +20,7 @@
class Chat extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->addcss('chat.css');
$this->addjs('chat.js');

2
app/widgets/Config/Config.php

@ -20,7 +20,7 @@
class Config extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->addjs('color/jscolor.js');
$this->registerEvent('config', 'onConfig');

2
app/widgets/ConfigData/ConfigData.php

@ -20,7 +20,7 @@
class ConfigData extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->addcss('configdata.css');

2
app/widgets/Connection/Connection.php

@ -15,7 +15,7 @@
class Connection extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->addcss('connection.css');
$this->registerEvent('connection', 'onConnection');

2
app/widgets/ContactCard/ContactCard.php

@ -21,7 +21,7 @@
class ContactCard extends WidgetCommon
{
function WidgetLoad()
function load()
{
$this->addcss('contactcard.css');
$this->registerEvent('vcard', 'onVcard');

2
app/widgets/ContactInfo/ContactInfo.php

@ -17,7 +17,7 @@
class ContactInfo extends WidgetCommon
{
function WidgetLoad()
function load()
{
$this->registerEvent('tune', 'onTune');
}

2
app/widgets/ContactManage/ContactManage.php

@ -20,7 +20,7 @@
class ContactManage extends WidgetCommon
{
function WidgetLoad() {
function load() {
$this->registerEvent('rosterupdateditem', 'onRoster');
}

2
app/widgets/ContactPubsubSubscription/ContactPubsubSubscription.php

@ -21,7 +21,7 @@
class ContactPubsubSubscription extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('groupsubscribedlist', 'onGroupSubscribedList');
$this->registerEvent('groupsubscribedlisterror', 'onGroupSubscribedListError');

2
app/widgets/ContactSummary/ContactSummary.php

@ -21,7 +21,7 @@
class ContactSummary extends WidgetCommon
{
function WidgetLoad()
function load()
{
$this->addcss('contactsummary.css');
$this->registerEvent('vcard', 'onVcard');

2
app/widgets/Discover/Discover.php

@ -1,7 +1,7 @@
<?php
class Discover extends WidgetCommon {
function WidgetLoad()
function load()
{
}

2
app/widgets/Explore/Explore.php

@ -1,7 +1,7 @@
<?php
class Explore extends WidgetCommon {
function WidgetLoad()
function load()
{
$this->addcss('explore.css');
}

2
app/widgets/Feed/Feed.php

@ -3,7 +3,7 @@
class Feed extends WidgetCommon {
private $_feedsize = 10;
function WidgetLoad()
function load()
{
$this->addcss('feed.css');

2
app/widgets/Help/Help.php

@ -20,7 +20,7 @@
class Help extends WidgetBase
{
function WidgetLoad() {
function load() {
}
function build()

2
app/widgets/Location/Location.php

@ -20,7 +20,7 @@
class Location extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->addjs('location.js');
$this->registerEvent('locationpublished', 'onLocationPublished');

2
app/widgets/Login/Login.php

@ -20,7 +20,7 @@ if (!defined('DOCUMENT_ROOT')) die('Access denied');
class Login extends WidgetBase {
function WidgetLoad()
function load()
{
$this->addcss('login.css');
$this->addjs('login.js');

2
app/widgets/Media/Media.php

@ -19,7 +19,7 @@
*/
class Media extends WidgetBase {
function WidgetLoad()
function load()
{
$this->addcss('media.css');
$this->addjs('media.js');

2
app/widgets/MediaUpload/MediaUpload.php

@ -19,7 +19,7 @@
*/
class MediaUpload extends WidgetBase {
function WidgetLoad()
function load()
{
$this->addcss('mediaupload.css');
}

2
app/widgets/News/News.php

@ -4,7 +4,7 @@ if (!defined('DOCUMENT_ROOT')) die('Access denied');
class News extends WidgetCommon {
private $_feedsize = 20;
function WidgetLoad()
function load()
{
$this->registerEvent('opt_post', 'onStream');
$this->registerEvent('stream', 'onStream');

2
app/widgets/Node/Node.php

@ -23,7 +23,7 @@ class Node extends WidgetCommon
private $role;
private $_feedsize = 10;
function WidgetLoad()
function load()
{
$this->registerEvent('stream', 'onStream');
$this->registerEvent('nostream', 'onStream');

2
app/widgets/NodeAffiliations/NodeAffiliations.php

@ -21,7 +21,7 @@
class NodeAffiliations extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('pubsubaffiliations', 'onGroupMemberList');
$this->registerEvent('pubsubaffiliationssubmited', 'onSubmit');

2
app/widgets/NodeConfig/NodeConfig.php

@ -21,7 +21,7 @@
class NodeConfig extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('pubsubconfig', 'onConfigForm');
$this->registerEvent('pubsubconfigsubmited', 'onGroupConfig');

2
app/widgets/NodeSubscriptions/NodeSubscriptions.php

@ -21,7 +21,7 @@
class NodeSubscriptions extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('pubsubsubscriptions', 'onSubscriptionsList');
$this->registerEvent('pubsubsubscriptionsssubmited', 'onSubmit');

2
app/widgets/Notification/Notification.php

@ -20,7 +20,7 @@
class Notification extends WidgetCommon
{
function WidgetLoad()
function load()
{
$this->addcss('notification.css');
$this->addjs('notification.js');

2
app/widgets/Notifs/Notifs.php

@ -20,7 +20,7 @@
class Notifs extends WidgetCommon
{
function WidgetLoad()
function load()
{
$this->addcss('notifs.css');
$this->addjs('notifs.js');

2
app/widgets/Poller/Poller.php

@ -20,7 +20,7 @@
class Poller extends WidgetBase
{
function WidgetLoad()
function load()
{
// We add the javascript that does the job.
$this->addjs('poller.js');

2
app/widgets/Presence/Presence.php

@ -21,7 +21,7 @@
class Presence extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->addcss('presence.css');
$this->registerEvent('mypresence', 'onMyPresence');

2
app/widgets/Profile/Profile.php

@ -23,7 +23,7 @@ class Profile extends WidgetCommon
private static $status;
function WidgetLoad()
function load()
{
$this->addcss('profile.css');
$this->addjs('profile.js');

2
app/widgets/PubsubSubscriptionConfig/PubsubSubscriptionConfig.php

@ -21,7 +21,7 @@
class PubsubSubscriptionConfig extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('groupsubscribedlist', 'onGroupSubscribedList');
$this->registerEvent('groupadded', 'onGroupAdded');

2
app/widgets/Roster/Roster.php

@ -22,7 +22,7 @@ class Roster extends WidgetBase
{
private $grouphtml;
function WidgetLoad()
function load()
{
$this->addcss('roster.css');
$this->addjs('roster.js');

2
app/widgets/ServerNodes/ServerNodes.php

@ -20,7 +20,7 @@
class ServerNodes extends WidgetCommon
{
function WidgetLoad()
function load()
{
$this->registerEvent('discoitems', 'onDiscoItems');
$this->registerEvent('discoerror', 'onDiscoError');

2
app/widgets/Subscribe/Subscribe.php

@ -20,7 +20,7 @@
class Subscribe extends WidgetBase {
function WidgetLoad()
function load()
{
$this->addcss('subscribe.css');
$this->addjs('subscribe.js');

2
app/widgets/Syndication/Syndication.php

@ -19,7 +19,7 @@
class Syndication extends WidgetBase
{
function WidgetLoad()
function load()
{
ob_clean();
header("Content-Type: application/atom+xml; charset=UTF-8");

2
app/widgets/System/System.php

@ -12,7 +12,7 @@
class System extends WidgetBase {
function WidgetLoad()
function load()
{
$this->view->assign('base_uri', BASE_URI);
$this->view->assign('error_uri', substr_replace(Route::urlize('disconnect', 'err'), '', -3));

2
app/widgets/Tabs/Tabs.php

@ -20,7 +20,7 @@
class Tabs extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->addcss('tabs.css');
$this->addjs('tabs.js');

2
app/widgets/Vcard/Vcard.php

@ -20,7 +20,7 @@
class Vcard extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('myvcardvalid', 'onMyVcardReceived');
$this->registerEvent('myvcardinvalid', 'onMyVcardNotReceived');

2
app/widgets/Vcard4/Vcard4.php

@ -17,7 +17,7 @@
class Vcard4 extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->registerEvent('myvcard4valid', 'onMyVcard4Received');
$this->registerEvent('myvcard4invalid', 'onMyVcard4NotReceived');

2
app/widgets/Visio/Visio.php

@ -17,7 +17,7 @@
class Visio extends WidgetBase
{
function WidgetLoad()
function load()
{
$this->addcss('visio.css');
$this->addjs('visio.js');

2
app/widgets/VisioExt/VisioExt.php

@ -20,7 +20,7 @@
class VisioExt extends WidgetBase
{
function WidgetLoad() {
function load() {
$this->addjs('visioext.js');
$this->registerEvent('jinglesessioninitiate', 'onSessionInitiate');
$this->registerEvent('jinglesessionterminate', 'onSessionTerminate');

2
app/widgets/Wall/Wall.php

@ -21,7 +21,7 @@
class Wall extends WidgetCommon
{
function WidgetLoad()
function load()
{
$this->addjs('wall.js');
$this->registerEvent('post', 'onStream');

4
system/widget/WidgetBase.php

@ -72,7 +72,7 @@ class WidgetBase
$this->name = get_class($this);
$this->WidgetLoad();
$this->load();
}
function t() {
@ -83,7 +83,7 @@ class WidgetBase
return call_user_func_array('Route::urlize',func_get_args());
}
function WidgetLoad()
function load()
{
}

Loading…
Cancel
Save