Organize the code for similar funcionallity

I have a funcionallity named “Tasks” divided with two parts. The part one with acess for all users, and the part two with similar funcionality, different layout and restricted for a specific users.
All of this in frontend. What the best way to organize my code?
Create one controller for the part one and other controller for the part two, and two folders for views.
like this:

> frontend/controllers

—TasksOneController.php
—TasksTwoController.php

> frontend/views

tasks-one
----index.php
----view.php
----etc…
tasks-two
----index.php
----view.php
----etc…

Or other structures for organize my code?
The “Tasks” is one example i have multiple cases of this.

Depends on if these two functionalities are going to be developed differently. If they likely will, having a copy is fine. It won’t be a copy soon.

If these are going to stay the same forever a parent-controller with protected methods should be OK.

@samdark yes these are developed differently.
For you is not confused work with the example i refer?
Adding all time one “suffix” for the similar funcionallity?

another example is:

purchaseController.php
purchaseManagementController.php

views

 purchase
   index.php
   view.php

 purchase-management
   index.php
   view.php

You can use modules for such separation.

Ok, so my code would look like this correct @samdark ?

 app
   -frontend
   ---controllers
   -----TaskOneController.php
   -----PurchaseController.php
   ---views
   -----task-one
   ------index.php
   ------view.php
   -----etc...

   ---modules     
   ----controllers
   -----TaskTwoController.php
   -----PurchaseManagementController.php
   ----views
   -----task-two
   ------index.php
   ------view.php
   -----etc...

Yes. I’d get TaskOne into taskOne module and TaskTwo into taskTwo module.

why? I did not understand? why get taskOne in module?

Because these are two separate groups of related functionality. You can, of course, keep one of these out of the module.

Ok, thanks i will try.