Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4600724
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:43:29+00:00 2026-05-21T23:43:29+00:00

One can change the query that is used for the list action in an

  • 0

One can change the query that is used for the list action in an admin generator configuration by using the table_method option. For example,

# apps/backend/modules/job/config/generator.yml
config:
  list:
    table_method: retrieveBackendJobList

But I want to restrict all the actions in the admin generator. In particular, I want to restrict all the objects displayed, edited, deleted, etc., to objects that have a particular attribute that may depend on the current day of the week or the time of the day.

I don’t want to override the model class because for other apps I want the restriction to be different (or perhaps no restriction at all).

Where (i.e., which file(s)) and how can I make this change?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:43:30+00:00Added an answer on May 21, 2026 at 11:43 pm

    Probably via the table_method and the generator.yml features to add and remove action buttons you’ve already taken care of customizing the index (i.e. list) action.

    For the other actions, you might wish to create additional methods in the models for these custom queries. But the place to override the default behavior is in the actions.class.php file for the module.

    So in your example, you’d edit the apps/backend/modules/job/actions/actions.class.php file and write custom code for each action you need to alter.

    So for example you could change the delete behavior like this:

    # apps/backend/modules/job/actions/actions.class.php
    require_once dirname(__FILE__).'/../lib/jobGeneratorConfiguration.class.php';
    require_once dirname(__FILE__).'/../lib/jobGeneratorHelper.class.php';
    
    class jobActions extends autoJobActions
    { 
      /**
       * Override standard delete action.
       * @param sfWebRequest $request A request object
       */
      public function executeDelete(sfWebRequest $request) {
        if ($some_custom_condition) {
          $job = Doctrine_Core::getTable('job')->find($request->getParameter('id'));
          $job->delete();
          $this->getUser()->setFlash('notice', 'Record deleted.');
          return sfView::SUCCESS;
        } else {
          $this->getUser()->setFlash('error', 'You do not have permission to do that.');
          return sfView::ERROR;
        }
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if pictures are uploaded using one style, how can i change the style of
I will like to know how I can change just one color in a
How can I change the root password to an empty one in MySql? The
how can i change the size of (particular one)cell which is the part of
Probably easy one. How can i change rows or column heigh? xlApp = new
One can remove all calls to printf() using #define printf . What if I
I have an odd issue. I have one PHP script that is used for
I have a datamodule that's used thoughout one of our line of business apps.
I have a query in Delphi using DBExpress TSQLQuery that looks like so ActiveSQL.sql.add('SELECT
I currently have a LINQ query written in one my controllers that I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.