A.Seddighi
A.Seddighi

Reputation: 1765

how to find Action is exist in controller in symfony

I want to check for example deleteAction exist in TimeController from other controller

how to check this?

Upvotes: 1

Views: 190

Answers (1)

Jason Roman
Jason Roman

Reputation: 8276

Since your question is so broad and without context I'll answer using general PHP:

if (method_exists(TimeController:class, 'deleteAction')) {
    // method exists, do something here
}

If you want to check if a particular route name exists, that's a little different.

Upvotes: 1

Related Questions