Can’t make sense of where Helper files exist, or how loaded

Permalink
Sorry if this is an uber-newbie question.

In 5.6 there was a file called concrete/helpers/concrete/asset_library.php. Now in 5.7, I can not file that file, which is bizarre to me as what is Loader::helper('concrete/asset_library'); actually loading?

In a 5.7 tutorial (http://www.concrete5.org/documentation/recorded-trainings/advanced-blocks/advanced-block-development-part-three/) I read

Also worth noting is that although most helpers are going to be at concrete/core/helpers/ all of the concrete/ helpers are in concrete/helpers/concrete/, which puts the asset library at concrete/helpers/concrete/asset_library.php. The concrete helpers are more likely to change and are not as general use, so they are not part of the override structure.


yet, I have no folders called concrete/helpers or concrete/core (or ‘helpers’ or ‘core’) anywhere in my c57 fs.

What I do have is ‘src/Application/Service’ which seems to have helper-ish stuff, such as FileManager.php,

I also see in that file the namespace is \Concrete\Core\File\Type\Type… and that actual file is in web/concrete/src/File/Type/Type.php so, is Concrete\Core the same as web/concrete/src/ ?

But more confusion ensued when I saw in FileManager.php the line

$v->requireAsset('core/file-manager');


But I only have the file ./web/concrete/css/build/core/file-manager.less… so what it is loading, and from where?

I fell into this maze simply looking for a list of all the helpers and their functions, but I could not one anywhere (if you know of one, please share, and the Helpers section ofhttp://www.concrete5.org/documentation/developers/5.6... does not count, as it does not reference many of the helpers I see in use)

For example, here is a list of all the helpers used in the C57 on Git.

Loader::helper('ajax')
Loader::helper('arrays')
Loader::helper('concrete/asset_library')
Loader::helper('concrete/avatar')
Loader::helper('concrete/composer')
Loader::helper('concrete/dashboard')
Loader::helper('concrete/dashboard/sitemap')
Loader::helper('concrete/file')
Loader::helper('concrete/scrapbook')
Loader::helper('concrete/ui')
Loader::helper('concrete/ui/help')
Loader::helper('concrete/ui/menu')
Loader::helper('concrete/upgrade/'.$ugh)
Loader::helper('concrete/urls')
Loader::helper('concrete/user')


Let’s say I wanted to see the code for validation/numbers. Ok, so after a bit of “find|grep” stuff, I locate the file...

./web/concrete/src/Utility/Service/Validation/Numbers.php

Awesome!

Yet, nowhere does there exist an asset_library.php

Can someone please explain where all the Helpers exist, how they are located by Loader, and/or whatever else i may need to know about helpers that I do not even know to ask about?

Is there some kind of ‘PATH’ that Loader::helper walsk through to find all the locations of where helpers might be? Is it set in stone? If so, what is it, and is there a order of priority?

Thanks

p.s. I was looking for a helper that allows me to map files to catagories/topics, if that ever can exist.

ntisithoj
View Replies: View Best Answer
Darragi replied on at Permalink Best Answer Reply
Hi ntisithoj,

Check this plugin:
http://www.concrete5.org/marketplace/addons/exchangecore-developer-...

It shows all available helpers and namespaces for concrete 5.7

Hope that helps,

Best,
Darragi
ntisithoj replied on at Permalink Reply
ntisithoj
Oh yeah! that is perfect! thansk :)
Chrouglas replied on at Permalink Reply
This would be great. Only problem is I have it where its supposed to be and it is not showing up as an option to install in the 'Add Functionality' page. Can someone confirm this is still a viable add-on before I go googling an answer to the problem I am getting from the potential solution that I found in an earlier google. I am getting to the point where I wish i could have my search engine auto populate a prefix "concrete5 5.7" each time I open it.

Couldn't there be a list of these somewhere?

These are the ones I needed... but i am sure its gonna come up again.
//$fm = Loader::helper('form');
$fm = Core::make('helper/form');
//$ph = Loader::helper('form/page_selector');
$ph = Core::make('helper/form/page_selector');
$ca = Loader::helper('concrete/asset_library');
//$ca = Core::make('helper/concrete/core/asset_library'); This one was an utter guess. :)
ntisithoj replied on at Permalink Reply
ntisithoj
bump
Kiesel replied on at Permalink Reply
It works.

Maybe you added it to blocks instead of packages or you put the folder right after you unzipped it into the packages folder. In this case is inside the folder another folder with the same name. One folder to much...
Kiesel replied on at Permalink Reply
I'd like to know too where the heck I'm supposed now to put my own helpers?

In 5.6.x I could just make a folder helper and put my file "security.php" inside. I could then load it with:
$sec = Loader::helper('security');


Simple as pie. But seems like it's not that simple anymore. Can someone shed some light on this?