Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to get current application

edited April 2011 in Vanilla 2.0 - 2.8
How can you get the current application name via a plugin? I can't seem to find it anywhere directly via the $Sender argument
Tagged:

Comments

  • This is just an untested idea: have you tried looking into the $Sender Array using print_r($Sender)?
  • yeah, went over it several times. The only way to get the ApplicationName is via a custom index object which is set by the application itself, so it's non-deterministic
  • SS ✭✭
    edited April 2011
    Sender->Application, Sender->ApplicationFolder
    Also check this discussion
  • null ... both null ... even in Base_Render_Before it is still, null.
    And in that discussion you mention nothing regarding to how to see the current application name/folder :)
  • SS ✭✭
    Not 'ApplicationName', but 'Application'.
    class Gdn_Controller extends Gdn_Pluggable {

    /**
    * The name of the application that this controller can be found in
    * (ie. Vanilla, Garden, etc).
    *
    * @var string
    */
    public $Application;

    /**
    * The name of the application folder that this controller can be found in
    * (ie. vanilla, dashboard, etc).
    *
    * @var string
    */
    public $ApplicationFolder;
  • edited April 2011
    Whoops, only just pressed send and typed reply earlier.

    $Sender->Application;
  • Lol, I don't know how the hell I missed that one. Thanks a lot!
Sign In or Register to comment.