We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    where can I find documentation for: removeExtensionPackage() & addExtensionPackage() ??

    I'd like to see if there are more functions for working with the extension packages [I'd like to test for existence i.e. listExtensionPackage()?]

    thanks
    -sean
      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      There's no listExtensionPackage - the addExtensionPackage method checks if it exists or not.


      To get a list of current extension packages:

      $extPackages = $this->getOption('extension_packages');
      $extPackages = $this->fromJSON($extPackages);
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 26503
        • 620 Posts
        thanks again Mark... so basically if I want to check or update a value in the extension_packages, it's probably far easier to remove & recreate it..

        got it.
        thanks.
          *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

          Sean Kimball CLP, CLS.
          Technical Director / Sr. Developer | BigBlock Studios
          ._______________________________________________.
          Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
          27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
          phone/fax: 905-426-5525
          • 22303 MODX Staff
          • 10,725 Posts
          I think just adding it would add/update it appropriately on install/upgrade. You should only need to remove an extension package when uninstalling...
            • 26503
            • 620 Posts
            Quote from: opengeek at Apr 12, 2012, 09:46 AM
            I think just adding it would add/update it appropriately on install/upgrade. You should only need to remove an extension package when uninstalling...

            A situation came up just recently where it might have been handy to check for an instance of another installed package [reCaptcha] & try to use some of it's system settings [private & public keys] even though I don't expect to see recaptcha installed as an extension ... it's more of a 'what if' situation.
              *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

              Sean Kimball CLP, CLS.
              Technical Director / Sr. Developer | BigBlock Studios
              ._______________________________________________.
              Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
              27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
              phone/fax: 905-426-5525