Skip to content

Commit

Permalink
added more info fw()->extensions->get()
Browse files Browse the repository at this point in the history
  • Loading branch information
themefuse committed May 14, 2015
1 parent 417d00a commit 742b2c3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion components/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,18 @@ The core of :doc:`Extensions </extensions/introduction>`.

.. code-block:: php
echo fw()->extensions->get('blog')->get_name();
echo fw()->extensions->get('extension_name')->get_name();
Also it can be used to check if an extension exists (is active).

.. code-block:: php
if (fw()->extensions->get('extension_name')) {
fw()->extensions->get('extension_name')->some_method();
}
// or there is shorter alias for this method
if (fw_ext('extension_name')) {
fw_ext('extension_name')->some_method();
}

0 comments on commit 742b2c3

Please sign in to comment.