Where to find a list of items that can be added programmatically?

I seem to remember seeing a list somewhere of a list of items and their identifiers of items that can be added programmatically.

For example, I’m creating a package that, part of what it does is add an image block and link it to a page. I know I can do something like this to add the image:

$block = \BlockType::getByHandle('image');
$data = array('fID' => INSERTIMAGEID);
$c->addBlock($block, 'NAMEOFBLOCK', $data);

But, if I want to add a link, or ALT tag, or any other option, where do I find a list of objects that I need to put into the array to do that?

That is just an example. Ideally I’d like to find a list for all block types.

EDIT: Think I found it:
https://documentation.concretecms.org/api/9.2.8/Concrete/Block/Image/Controller.html

Yeah you would check the controller in this case - I think you might also be able to do something like var_dump(get_class_vars($block)) in your code above and look at the output of that to guide you as well.

Thanks for the info. I checked the controller but the, for some reason, the property I need isn’t working. I started a new thread on the specifics:

1 Like