What does "Loader::block('library_file');" do at the top of a block's controller file?

Permalink
I have spent half a day trying to figure out why I was getting a fatal error on trying to add a custom block I created to a page.

Well...I think I finally figured it out.

In looking at the code for the standard HTML block I saw the following line just above the controller class definition...

Loader::block('library_file');


So I added it to mine and voila...the problem disappeared.

Some would leave it that but I want to understand WHY this fixed things. What exactly does "Loader::block('library_file');" do?

I've looked at the source code of the file (at least I think it was the file that is being loaded) and couldn't make heads or tails of what it does other than it seemed to be some basic file for the operation of Concrete5 (duh).

I've noticed this line "Loader::block('library_file');" is in some blocks and is not in others.

How does one determine whether to include it or not in a block's controller file???

Anybody?

Thanks.

Carlos